Budapest is to drop its bid to host the 2024 Olympic Games, a Hungarian government spokesman confirmed.
More than 260,000 people had signed a petition against the plan, with opponents saying the money would be better spent on hospitals and schools.
Los Angeles and Paris are the other bidding cities after Hamburg pulled out in 2015 followed by Rome a year later.
The International Olympic Committee (IOC) will elect the winner at a vote in Lima, Peru, in September 2017.
Hungarian government spokesman Zoltan Kovacs told Reuters a decision to drop the bid was made after a meeting between Prime Minister Viktor Orban, Budapest Mayor Istvan Tarlos and the Hungarian Olympic Committee.
The decision to drop the bid will be formally voted on by the Budapest City Assembly.
Fidesz, the governing party, said the decision was made to avoid "a loss of international prestige" as the bid had a very small chance of success.
Hungary is the only one of the 10 most successful medal-winning countries at the summer Olympics never to have hosted the event.