BUCHAREST — A referendum to remove President Traian Basescu from office was declared invalid Sunday because of a low turnout, Romanian election officials said.
The Central Election Bureau put the voter turnout of the referendum at 45.9 percent, with a 3 percent margin of error. By law, such referendums are invalid if less than half the electorate cast ballots.
The bureau did not immediately give the vote count, but two exit polls said more than 80 percent voted to impeach Basescu.
Basescu confirmed on national television that he had survived the attempt to remove him because of the low turnout, saying: ‘‘Romanians have invalidated the referendum by not participating.’’
He was accused by his rivals in the government of violating the constitution by meddling in government business, coddling cronies, and using the secret services against his enemies.
The use of a recall referendum by Prime Minister Victor Ponta, the president’s left-wing opponent, to try to oust him reflects the strains in Romania’s post-communist democracy.
Ponta’s move was heavily criticized by the European Union and the United States as a breach of the rule of law and improper interference with the judiciary.
The dispute plunged the country into political turmoil and raised questions about whether Romania could retain a $6.2 billion financial aid package from the International Monetary Fund and others.
‘‘Romanians rejected a coup d’etat,’’ Basescu said after the exit polls were announced. ‘‘The flame of democracy is still burning.’’
Before the voting began, Basescu characterized the referendum as part of a political vendetta by Ponta and called on the public to boycott the referendum. He told reporters he was at peace with himself. ‘‘I have done my duty as president in a manner that sometimes pleased people and at other times did not please a large number of Romanians,’’ he said.
Basescu, 60, who has been president since 2004, survived a similar referendum in 2007, with about 74 percent of the votes cast opposing his removal. Voter turnout was about 44 percent.
Romania, which is among the poorest countries in the European Union, has struggled to overcome lawlessness and corruption since it joined the union in 2007.
Critics said Ponta’s governing coalition has undermined democracy in the country by dismissing the speakers of both chambers of Parliament, an action the opposition attacked as unconstitutional.
Ponta also replaced the country’s ombudsman, who has the power to challenge emergency legislation before the Constitutional Court. The governing coalition has threatened to remove judges from that court as well
Jose Manuel Barroso, president of the European Commission, the EU’s executive branch, last week issued a stern statement expressing ‘‘serious concerns about recent political events in Romania in relation to the rule of law, the independence of the judiciary, and the role of the Constitutional Court.’’
The coalition of Social Democrats and Liberals led by Ponta did very well in June local elections, but Ponta’s popularity has declined after he was accused of plagiarizing large sections of his 2004 doctoral thesis, accusations subsequently upheld by a Romanian academic panel. The latest political turmoil has also dented his government’s popularity.
Parliament, dominated by Ponta allies, impeached Basescu earlier this month, setting up Sunday’s national referendum on his future.
The relatively low turnout came as Romanians baked in a heat wave with temperatures hitting 100 degrees in the capital. Many took refuge in mountain resorts, others flocked to the Black Sea beaches, while shopping malls in Bucharest were unusually busy.
Most of those who did vote were expected to cast a ballot against Basescu.
‘‘I am not happy with what is happening to the country, the economy, all the political scandal and the corruption,’’ said Cristian Neagu, 28, a computer programmer who wants Basescu gone.
Other Romanians said they were disgusted by the whole ordeal. ‘‘There are bandits on both sides, and I can’t be bothered to vote,’’ said Vlad Tanasescu, 34. ‘‘All they want to do is to take revenge on each other.’’
Basescu is a center-right politician, though as president he is not allowed to be a member of any party. Unlike presidencies in some European nations, Basescu’s position is not merely ceremonial. He is elected in a popular vote and is in charge of foreign policy and the country’s defense policies.