Pro-Russian insurgents launched the attack on a road linking the towns of Slavyansk and Kramatorsk, both of which they control.
The Ukrainian army had established a checkpoint on the highway, apparently designed to drive a wedge between the two rebel strongholds.
The ambush appears to have been a counter-strike by the pro-Russians, who declared on Monday independence in two eastern regions after a controversial referendum in favour of self-rule.
The defence ministry in Kiev said a military convoy came under fire from about 30 insurgents as it passed under a bridge.
The assailants used rocket-propelled grenades as well as machine guns; another eight soldiers were wounded.
This was the army’s heaviest blow since the government launched an “anti-terrorist” operation to restore control over Donetsk region last month.
The battle highlighted the failure of the offensive to make any headway.
But it coincided with an announcement by Sergei Taruta, the official governor of the region, that Donetsk would still vote in Ukraine’s presidential election on May 25, despite the area’s supposed transformation into an independent “People’s Republic”.
Mr Taruta, a steel billionaire, was appointed governor by the Kiev authorities in March.
He remains in the city, although rebels who denounce him as an agent of a “fascist junta” now occupy his old office.
Mr Taruta believes they command only minority support, saying:
“This part of Ukraine remains part of Ukraine”.
Donetsk would participate in the election, he declared, although the governor conceded that voting would be impossible in Slavyansk.
“In all other cities, thank God, we are making all the necessary preparations,” said Mr Taruta.
“All the polling stations, all the election committees are being formed this week.
Ballot papers are now in the process of being printed.”
He added: “We will assure everybody there will be sufficient forces to secure the people.”
As for the ambition of the some separatist leaders to bring Donetsk into Russia, Mr Taruta said:
“There is no question now of joining Russia. Russia is not in a hurry to embrace this part of Ukraine.”
Mr Taruta is trying to settle the crisis by negotiating with pro-Russian MPs from Donetsk.
He has proposed a referendum in June on granting the region more autonomy.
But he ruled out negotiating with the separatist leaders who staged their own referendum on self-rule last Sunday.
“Unfortunately, there are no leaders who can take all the decisions and be responsible for solutions,” he said.
In reality, however, the government may have little choice but to negotiate.
Tuesday's defeat underlined the failure of its military offensive.
Elsewhere, Kiev may actually have less control than before the operation began.
Last Friday, the security forces killed between five and 20 people in Mariupol, the second biggest city in Donetsk with a population of 500,000.
Local people believe that innocent civilians were the main victims.
Afterwards, popular fury compelled the security forces to abandon Mariupol and turn over the city to the pro-Russian movement.
In some areas of Donetsk, the police have defected, leaving the offensive in the hands of the army and the National Guard.
Many of the soldiers in the latter force are local men who live in fear of reprisals.
While on duty, they often resort to wearing masks to conceal their identities.
Mr Taruta was still able to give a press conference at a Donetsk hotel, only streets away from the separatist headquarters.
With his office occupied, an aide said that he was “working in places around the city which are convenient to those who ask for a meeting”.
Frank-Walter Steinmeier, Germany’s foreign minister, tried to broker a quick launch of talks between Kiev and the separatists controlling Donetsk and Luhansk, which together form the nation’s industrial heartland.
Mr Steinmeier’s trip is part of a plan for settling Ukraine’s crisis laid out by the Organisation for Security and Cooperation in Europe, which has yet to make any headway.
Source: The Telegraph