Mayor Istvan Tarlos had suggested the city might quit the race after local opponents of the bid last week submitted a quarter of a million signatures
Hungary's government announced on Wednesday it would withdraw Budapest's bid to host the 2024 Olympic Games, citing a lack of political and national unity behind the application that it blamed on the opposition.
Bidding alongside powerhouses Los Angeles and Paris, Budapest had been considered a long-shot candidate, pinning its hopes on the International Olympic Committee's (IOC) Agenda 2020 initiative.
Budapest Mayor Istvan Tarlos had suggested the city might quit the race after local opponents of the bid last week submitted a quarter of a million signatures in a petition demanding a local referendum in Budapest on the issue.
"For Budapest and Hungary the Olympics is a national issue," the government said in a resolution published on national news agency MTI.
"In recent months, the earlier unity has broken down and the issue of the Olympics has turned from a national issue into a party issue. Opposition parties are responsible for this, those who backtracked on their earlier decision (to back the bid)."
Wednesday's decision was made at a meeting between Tarlos, Prime Minister Viktor Orban and the chairman of the Hungarian Olympic committee.
The IOC said it would await official notification from the national Olympic committee of the country, the only authority which can officially withdraw a bid.
The Hungarian government's decision, however, is a further blow to the Olympic bid process with Boston, Hamburg and Rome having pulled out of a race that has now been left with just two cities.
The IOC voted in a string of reforms, named Agenda 2020, two years ago in the hope of making the Games more affordable and attractive for potential host cities.
Earlier on Wednesday, Tarlos, who only began to support the bid after Agenda 2020 promised to make hosting the Olympics more affordable, had urged a fast resolution of the issue.
"I never insisted on the Olympics," he told the city council. "There is no point dragging out this process like strudel dough."
The United States' Olympic Committee and the Olympic organisers in Los Angeles were not immediately available to comment on the Hungarian decision.
According to a survey published on Wednesday by pollster Median, half of Hungarians wanted Budapest to withdraw its bid bid, with only a third supporting it nationally. In Budapest, 56 percent of voters were against the bid.
Sentiment changed as a group of young professionals and students collected more than a quarter of a million signatures in a month to press for a referendum on the Olympic bid.
Their Momentum movement has burst on to Hungary's political scene to challenge Orban's government and opposition parties a year before elections in 2018.
No opposition group has had such an impact on a major issue since Orban rose to power in 2010. In targeting the Olympics, Momentum has challenged an event seen as being of symbolic importance to the prime minister.
Momentum spokesman Gergo Papp told local website Index.hu that the government had backtracked on the bid "in a cowardly manner", saying they had taken away a chance for the people to vote on the project.