An opposition candidate defeated a former president backed by the government to win a parliamentary seat north of Beirut, official results showed Monday, after a tense election to replace two assassinated lawmakers that has become a showdown between the pro-US government and opponents supported by Syria and Iran. In the Lebanese capital, the government coalition retained a seat virtually unopposed. Tens of thousands of Lebanese took part in Sunday's vote, which was largely peaceful. It took place amid tight security in two electoral districts, one in Beirut and the other in Mount Lebanon's Metn region, a Christian stronghold north of Beirut. Although the vote was for just two seats, it could affect the political future of this deeply divided nation by influencing who lawmakers might elect as president in the next few months. The key vote was in Metn. The election there pitted Amin Gemayel, a former president from 1982-88 running on behalf of the government coalition to fill a seat his son held before his assassination last year, against Kamil Khoury, a political newcomer who is supported by Christian opposition leader Michel Aoun, a former army commander and interim prime minister allied with the Hizbullah-led opposition. The pro-government coalition retained its seat in Beirut, according to official results. But in Metn, the government coalition lost the seat by a small margin, the government said. Before the final results became clear, both sides in Metn accused the other side of fraud. Each had supporters celebrating in convoys on the streets in Beirut and the Metn region. Witnesses and security officials said partisans of Aoun and Gemayel faced off in a neighborhood east of Beirut late Sunday, with scores of Lebanese army troops and riot police deployed to prevent trouble. Antoine Nasrallah, a spokesman for Aoun, also told Al-Jazeera that one of their supporters was wounded in the hand when he was shot at by Gemayel supporters near the town of Bikfaya. Security officials said one person was slightly injured but did not say from which camp. A local TV station called the Metn election "the mother of all battles," because it was deemed a key popularity test for Gemayel, the head of one of Lebanon's most powerful Christian families, and Aoun, who has already announced he would run for president. Both are Maronite Catholics, as the traditional power-sharing agreement among the country's various religious sects since the 1943 independence dictates that the president must be. Lebanon's government and opposition have been locked in a fierce power struggle for months, and the choice for a new president is viewed as a crucial step to fix whether the US-backed government succeeds or if the pro-Syrian camp prevails. Both sides declared they had won a few hours after the polls closed Sunday. Voting took place in a "calm and democratic atmosphere" and there was a large turnout, said a statement from the Interior Ministry. "We have been informed of our victory," Aoun said through his OTV station. He accused authorities, however, of seeking to cancel one of the ballot boxes in the district of Jdeideh east of Beirut and asked his supporters to head there. "We hope that everything goes quietly tonight," he told reporters. However, partisan clashes were reported in Jdeideh later Sunday. Gemayel earlier on Sunday refused to concede defeat. "Congratulations for your victory," he told a crowd of supporters outside his house, to the backdrop of fireworks. The candidate, who was president of Lebanon for much of the 1980s, said voters on Sunday had given him "overwhelming support." Interior Minister Hassan Sabei, announcing the results before dawn Monday, declared Khoury the winner in Metn, with an 418 vote edge. Khoury won with 39,534 votes, against Gemayel's 39,116 votes. Turnout was 46 percent. Gemayel also claimed Sunday there was fraud and contested the results in one voting station in one district, calling for a revote in that area. Gemayel called for calm on the streets. "We don't want anyone to drag us into a confrontation that we don't need," he said. Voters were replacing Gemayel's son, legislator and cabinet minister Pierre Gemayel who was shot dead in November, and lawmaker Walid Eido, a Sunni Muslim who was killed in a Beirut car bomb in June. Both were government allies and vocal opponents of neighboring Syria, which controlled Lebanon for 29 years until it was forced out in 2005. In Beirut, the vote for Eido's seat was easily won by Mohammed al-Amin Itani, a candidate of parliament majority leader Saad Hariri's Future Movement, particularly since the Hizbullah-led opposition did not officially sponsor a candidate. Sabei, whose ministry organizes the balloting, declared Itani a winner with 22,988 votes. An opponent came a distant second, with 3,556 votes. Turnout was about 19 percent. At the entrance of Gemayel's hometown of Bikfaya, pictures of the candidate and his slain son were displayed on balconies, cars and electricity poles. While pro-government politicians accuse the opposition of being agents for Iran and Syria, Hizbullah leaders and Aoun accuse the ruling majority of subservience to the United States. Aoun has said the Metn elections are "to liberate the country from political feudalism, sectarian intolerance and political bribery," a reference to the Gemayel family's role in Lebanese politics since the 1930s. The elections could escalate the country's deepening political crisis because Prime Minister Fuad Saniora's Western-backed government called them without the required approval of President Emile Lahoud, who has blocked attempts to replace the lawmakers. Lahoud considers Saniora's government to be illegitimate. Lahoud is allied with the Hizbullah-led, pro-Syrian opposition, as is Parliament Speaker Nabih Berri, who has said he will not recognize the results of the contests. Gemayel and the government have accused Damascus of being behind the assassination of his son and a number of other anti-Syrian politicians and public figures over the last two years, part of what they deem is Syria's plan to end the majority's rule through attrition. Syria has denied the allegations. With Eido's death, Saniora's margin in parliament has been whittled down to only four seats.