The main aim of the third Battle of Komárom was to push back the Austrian army, easing the task of the Hungarian army to retreat towards South-East. The Hungarian Government agreed on a Hungarian attack against the Austrian troops led by Julius Jacob von Haynau, which was stationing to East and South-East from the fortress of Komárom. On 11 July the Hungarian army started to attack the Austrians. Although General Artúr Görgei was the commander of the Hungarian Army of the Upper Danube, General György Klapka took over the command of Görgey's army because of Görgey's injury in the Second Battle of Komárom from 2 July 1849. New Hungarian troops arrived under the command of Ármin Görgey, and from Bátorkeszi under József Nagysándor, decreasing the Hungarian numerical disadvantage in relation to the Austrian army led by Julius Jacob von Haynau.

The Hungarian army's (comprising 58 infantry battalions, 68 cavalry battalions, and 200 cannon) corps which participated in the attack against the Austrian positions were under the command of Colonel Ferenc Aschermann, Ernő Poeltenberg (II. corps), Károly Leiningen-Westerburg (III. corps), József Nagysándor (I. corps) and General Gusztáv Pikéthy (the Pikéthy cavalry division). The right flank fought with Schlik's corps. Although Leiningen was successful in pushing back the Austrian troops around Csém, as well as the II. corps too, which advanced through the Meggyfa- and Ács forests, the Hungarians could not turn these successes to their advantage because of the inactivity of Nagysándor and Pikéthy. At Csém there was a fierce artillery fight with great losses.

The battle finished at 5 pm with the retreat of the Hungarian troops. The Austrians lost 800 men, while the losses of the Hungarians are uncertain. This battle was the bloodiest fight during the revolution. Although the Hungarians did not achieve the victory, they still managed to start their retreat from Komárom, leaving a contingent of nearly 20 000 soldiers to defend the fortress under General Klapka.

Background In the Second Battle of Komárom from 2 July 1849, the commander of the Army of the Northern Danube, General Artúr Görgei, suffered a serious head injury, as a result of which he was lying unconscious until 4 July, between life and death.. Before the battle of 2 July, as a result of a misunderstunding between him and the Governor-President of Hungary Lajos Kossuth, the latter removed him from the position of the main commandement of the Hungarian main army, leaving him only with the position of War Minister, appointing in his place as the head of the army Lieutenant General Lázár Mészáros, but the message with this decision arrived to Komárom only after the battle. Major General György Klapka, who, as senior officer was replacing the temporarily unconscious Görgei, a meeting of the Hungarian officers, presenting them Kossuth's decision, but the Hungarian officers protested, affirming their loyalty towards Görgei, and they sent Klapka and General József Nagysándor to the capital, to express the armies support to Görgei, and their opposition to Kossuth's decision in the ministry council. As a result of their resolution, the ministry council held at 5 July dismissed Görgei, on his own demand from his post as Minister of War, but allowed him to remain in the lead of the army until he arrived with the Army of the Upper Danube from Komárom to the joining point of the main Hungarian troops around Szeged, with the condition to accept Lieutenant General Mészáros as high commander. They decided that in Komárom, under the command of Colonel Ferenc Aschermann, 18 000 men had to remain, while the rest of the army was to hurry towards south to unite with the Hungarian forces concentrating there against the Russian army and Josip Jelačić's Austrian Army of the South. They designated as the date of the departure of the Army of the Upper Danube 7 July, under the leadership of Major General György Klapka, who had to fulfil the duties temporarily of the convalescent Görgei.Csikány Tamás: Egy céltalan haditerv - Komárom 1849 július 11 Hadtörténelmi közlemények, 2013/2, pp. 364 The ministry council also authorized the Army of the Northern Danube to make a Reconnaissance-in-force on the right shore of the Danube against the imperial forces, stipulating to the Hungarian army to retreat towards Szeged even if they score a victory. But if they consider that the enemy forces are too strong, to abstain from battle. Meanwhile, Lázár Mészáros tried to do everything to hurry the troops departure towards Szeged, in order to cross the Danube at Buda before the Russian troops led by Field Marshal Ivan Paskevich arrive there to cut their retreat route. He considered that they have 48 hours to arrive to the capital before the Russians. In order to facilitate the marching away of the main troops towards southeast on the right bank of the Danube, he proposed to the troops which had to remain in Komárom after Görgei's departure, to demonstrate west to the fortress in front of Haynau's army, binding the Austrians attention on themselves.Csikány Tamás: Egy céltalan haditerv - Komárom 1849 július 11 Hadtörténelmi közlemények, 2013/2, pp. 363

On 6 July in the military council held at Komárom, the officers argued on which shore of the Danube to retreat the Hungarian army towards Pest. Görgei who, despite being convalescent, was present in the council, proposed a Hungarian attack at 9 July against the forces of Field Marshall Julius Jacob von Haynau, in order to facilitate the upcoming march of the Upper Danube Army towards southeast. Görgei considered that a victory against the Austrian main army was necessary, before marching to the meeting point in the south. Only Klapka and Nagysándor disagreed with this plan but the military council accepted Görgei's plan.

But in the next day, Klapka, received a letter from Kossuth, signed also by prime minister Bertalan Szemere, asking him to start immediately the march towards Szeged. After discussing with the chief of staff Colonel József Bayer, but without informing Görgei, who was feeling ill that day, he ordered to the I Corps led by Nagysándor, to start their march towards Pest. The 8500 soldiers of Nagysándor started their march towards Vác in the next day, but Görgei took notice about this, and resigned as a protest against this decision, but the council of the officers convinced him to take back the leadership of the army, and they convinced Klapka as well to call back the I Corps to Komárom. These events caused a delay in the implementation of the attack planned to 9 July, so the Hungarians decided to attack at 11 July, also hoping with this to lull the Austrians' vigilance. Instead of the still convalescent Görgei, Klapka was appointed to lead the attack of the Hungarian army..

On 8 July Klapka wrote a letter to Kossuth in which he declared that although he taught that Görgei's plan to attack Haynau was pointless and that he did not believe in its success, he remains loyal to Görgei, and implores Kossuth and the government to renounce to the repeated attempts to remove the high commander because this will generate more conflicts between the political and military leadership, from which only the enemy will profit.Csikány Tamás: Egy céltalan haditerv - Komárom 1849 július 11 Hadtörténelmi közlemények, 2013/2, pp. 364-365

In the days before the battle the government, the ministry council, and the high commandment represented by Lieutenant General Mészáros issued contradictory decisions regarding the remaining of the Army of Upper Danube in Komárom, or its departure, as well as its route towards Southern Hungary. Mészáros, although that he wanted to hurry up the departure, on 7 July he considered that it would be very dangerous to break through the enemy blockade, so it would be better to remain at Komárom with 40,000 soldiers to tie down the twice numerous enemy troops, and to send only 3000 hussars towards Paks. Later he wrote that because of the danger of the enemy's approach, he is forced to make the Chain bridge unusable, and the only still usable way for the army to march to the meeting point at Szeged was on the left bank of the Danube, through Vác, but its safer to remain in Komárom. Kossuth wrote on 8 July that the Army of the Upper Danube should march towards Southern Hungary through Transdanubia, but its main goal must be "defeating the Austrian army". He also wanted, instead of continuing their march towards Szeged, to stop with the IX. corps led by General Józef Wysocki and General Arisztid Dessewffy and the newly formed X. corps of General Mór Perczel, the Russian troops in Tiszántúl. This was caused probably that he probably understood the mistake of the order, decided on 29 June, to retreat the army, without a fight, from the majority of the country to Southern Hungary. But Mészáros and Dembiński were unhappy with this decision.Csikány Tamás: Egy céltalan haditerv - Komárom 1849 július 11 Hadtörténelmi közlemények, 2013/2, pp. 365-366

On the Austrian side Field Marshal Haynau knew that he cannot move away from Komárom, one of the most modern fortification system of the empire, until the Hungarian Army of the Upper Danube, with its 40,000 soldiers was behind its walls.Csikány Tamás: Egy céltalan haditerv - Komárom 1849 július 11 Hadtörténelmi közlemények, 2013/2, pp. 366 If he moved away eastwards from it to Pest and Buda, the army of Görgei could sortie and cut his supply routes, and advance towards Vienna. He knew that although twice more numerous, he cannot attack with his troops the fortifications, because the 246 cannons of various caliber, of Komárom could cause huge losses to them. So he had no other choice then to stay in front of Komárom. Haynau hoped that the Russian troops from northern Hungary will help him by blockading Komárom on the left banks of the Danube, but the division of Lieutenant General Pavel Hristoforovich Grabbe of almost 13,000 soldiersBánlaky József: A magyar nemzet hadtörténete XXI Arcanum Adatbázis Kft. 2001 did not came there because its duty was to guard the roads towards Galitia, while the Russian main army led by Field Marshal Ivan Paskevich on 10 July was only at Mezőkövesd and Gyöngyös, to 10 days of marching.Csikány Tamás: Egy céltalan haditerv - Komárom 1849 július 11 Hadtörténelmi közlemények, 2013/2, pp. 366-367 So Haynau was forced to keep the Austrian II. corps on the left bank of the Danube, north from Komárom, to keep an eye there, if the Hungarians want to do something on the northern shore of the Danube.Csikány Tamás: Egy céltalan haditerv - Komárom 1849 július 11 Hadtörténelmi közlemények, 2013/2, pp. 367 In order to ensure the connection of the II. corps with the bulk of his army from the right bank of the Danube, Haynau's troops built a bridge between Lovadpuszta and Aranyos, with emplacements for heavy cannons on its both bridgeheads, in order to send troops over it, if the II. corps was attacked.Csikány Tamás: Egy céltalan haditerv - Komárom 1849 július 11 Hadtörténelmi közlemények, 2013/2, pp. 368

So Haynau had only one choice: to wait. But he knew that an army of 40,000 soldiers could soon run out of supplies, and this can force them to do two possible things: to retreat towards Pest, or to attack his troops and defeat them. Haynau was certain that if Görgei tries to sortie from the fortress, and to break the Austrian lines, he can defend himself with his superior forces. He calculated that even if the Hungarians succeed to defeat his troops, they will be still forced to retreat towards Szeged, so he will became soon the attacker again, because he will pursue them. And if the Hungarians try to retreat towards Pest, then he will pursue them, leaving smaller forces at Komárom to blockade the fortress.

According to the Table of organization of the Austrian army around Komárom, under the leadership of Haynau were the following troops:

- I. corps: 17,879 soldiers, 54 cannons;