Nearly 350,000 Chileans took to the streets in a joyous rally to celebrate President Augusto Pinochet's defeat in a referendum, but at least 40 people were injured in violent clashes with police. Half a dozen people lay on the street behind Santiago's national palace Friday evening after police fired tear gas and water cannons at a crowd of several hundred anti-government demonstrators and then charged, nightsticks swinging. The demonstrators had come from the peaceful rally at an outdoor park, where the crowd estimated by police at 350,000 swayed and sang to popular Chilean music. About 18 foreign reporters also were injured Friday in the demonstration at the national palace and other incidents, which they described as unprovoked attacks by police. At least six were treated at clinics for head injuries. Earlier Friday, soldiers at an army barracks near the rally site fired birdshot and pellets at passengers in cars who flashed the victory sign at them, Radio Cooperativa reported. Fifteen people were injured, including one who underwent surgery to remove a pellet from his head, the radio said. A spokesman for the Santiago Central Emergency Hospital told The Associated Press that nine people were treated there for gunshot wounds, and a tenth was taken to a neurological hospital for surgery. A spokesman for the National Police said there was no one available to comment on the incidents. Friday's rally was organized by the opposition political groups that urged Chileans to vote ``no'' in Wednesday's referendum in which Pinochet, 72, lost his bid to remain president until 1997. His defeat sets the stage for presidential elections in December 1989 and the inauguration in March 1990 of the first freely elected president since Pinochet, commander of the army, toppled Salvador Allende in a bloody coup in 1973. Opposition leaders want Pinochet to move up the date of next year's elections, and vowed Friday to press that demand even though the aging commander-in-chief firmly rejected it Thursday during a speech broadcast nationwide. ``If we (opposition groups) join together with more force, I think the situation will change,'' said moderate Socialist Ricardo Lagos, a leader of the 16-group opposition coalition. ``You have to give the defeated a couple of days to recover from the shock.'' Many of the 3.8 million Chileans who voted against Pinochet also want early elections. ``Chi Chi Chi. Le Le Le. Get Out Pinochet,'' chanted the crowd at the rally. Funerals for two people killed during anti-government demonstrations Thursday night were set for today. Police acknowleged they shot a 31-year-old man and said a 14-year-old boy was shot by an unidentified gunman, police said. Two others who were shot by unidentified gunmen was hospitalized in serious condition Friday, police said, adding that eight officers were injured in clashes with demonstrators Thursday. Dozens of people were arrested Thursday and Friday. Most were released after brief detentions. Among the foreign journalists injured were Christopher Morris, an American freelance photographer for Newsweek, and Liliana Nieto, an American photographer for the Long Island, N.Y. daily Newsday. They and at least three others were treated at Santa Maria Clinica for head injuries. A group of about 50 foreign journalists, mostly Latin American, walked to a National Police station and filed a complaint protesting ``the lamentable events against the dignity of reporters ... by national police and other security forces'' and asked for guarantees of their safety. Eva Miranda of Argentina, a spokeswoman for the journalists, said two reporters _ Eduardo Sanjuan and Jordy Villaroel from TV-3 in Barcelona, Spain _ were hospitalized Friday after they were beaten by police.