Substitute Adam Gyurcso struck late to help Hungary beat the Czech Republic 2-1 in the host's final European Championship tuneup on Friday.
The Czechs were mostly dominant but were badly missing the creativity and technical skills of injured captain Tomas Rosicky, who is expected to recover from a calf muscle injury in time for the tournament in Poland and Ukraine.
"We held the upper hand but were harmless in attack," said Czech coach Michal Bilek, who used just a lone striker in Milan Baros up front. "I'm sorry for the loss, especially in front of our fans, but I hope that will prove our strength at the Euros."
The Czechs will open their Euro 2012 campaign against Russia on June 8. They will also face Greece and Poland in Group A.
Gyurcso scored with an angled shot against the run of play two minutes from time.
The visitors went ahead in the sixth minute after a tactical blunder by the home team. Hungary was given a free kick from 20 meters and Balazs Dzsudzsak opportunistically netted when the Czechs were still forming a defensive wall, giving goalkeeper Petr Cech no chance.
"Such a mistake shouldn't have happened," Bilek said.
Center back Michal Kadlec equalized from the spot in the 24th with a left-footed low shot for his eighth goal in 34 internationals.
The penalty was awarded after Baros was brought down in the area by Roland Juhasz.
Kadlec was playing with a face mask because his nose is broken.
"It was for the last time," Kadlec said. "I won't use it in the match against Russia."
The Leverkusen defender has recently established himself as a reliable scorer and was the most prolific of all Czechs in Euro qualifying with four goals.
The Czechs need to improve if they want to advance from what many consider the weakest group at the Euros, and Rosicky's return seems to be key.
Daniel Kolar was used in Rosicky's playmaking position but could hardly replace the captain.
A reliance on one striker also does not seem to be working, though Baros has scored 41 international goals.
The Czechs wasted several chances. Hungary's goalkeeper Adam Bogdan produced a brilliant save in the 60th from Jan Rezek's header. In another attempt in the 75th, the unmarked Vaclav Pilar failed to hit the target from the edge of the area.
Pressing for an equalizer, the Czechs went on attack and had a goal by Rezek disallowed in the 15th due to a previous tackle by Kolar on a defender.