In order to march from Granada to Managua, Walker's filibusters faced an approximately 26 mile trek, as opposed to the approximately 83 miles separating Martínez from his capital. Walker calculated, and counted on, there being a window of around a week between when he arrived at Managua and when Martínez would be able to arrive and overwhelmingly outnumber him. Thus, as he departed with his 500 man army on September 7, Walker knew his only viable chance at success would come with defeating the 500 man garrison currently in Managua and then holding a defensive posture to throw back Martínez's 400. This was to be no easy feat, however. Even from the outset, the task proved to be quite the challenge for Walker. His men had no artillery pieces with which to attack Managua, while the defenders of the city boasted a pair in their defenses. Furthermore, Walker expected to have arrived at Managua by September 9, with Martínez only finding out of his movements by his arrival. Instead, Walker would arrive on September 10, with Martínez having heard about his actions on September 8, to which he promptly began to mobilize his men for their own march on Managua.
Facing equal odds numerically and holding an advantage in terms of quality of light arms if not artillery, Walker decided he must assault rather than siege the city. The ever looming threat of the arrival of Martínez played into his calculations as well. Therefore, he separated his three divisions of filibusters into three assault columns. The main column would come from the south, led by Walker and Wheat, while diversionary columns under Henningsen and Fry assaulted from the west and east of the city. The commander of Managua's defenses, Fernando Guzmán Solórzano, had anticipated this positioning and concentrated his troops accordingly. His two artillery pieces were located in the main southward avenue, while his soldiers occupied hidden positions inside buildings and behind corners and walls. When Walker's men finally appeared into view on September 11, Guzmán was ready and personally pulled the lanyard on the opening artillery shot of the battle before returning to his headquarters to direct it. The Battle of Managua had begun.
Despite facing the stiffest opposition, Walker's column was not halted. Ultimately, the pair of artillery pieces only managed to secure two hits into the charging filibusters. This was due in large part to the inexperience of their crews, many of whom had never even fired the pieces before. With their more accurate rifles, the filibusters quickly eliminated all the members of those artillery crews who did not flee for shelter, allowing them to close the distance without the threat of the use of grapeshot. It was once they had closed the distance, however, that their struggles began. In the house by house struggle, the advantage of their rifles were effectively negated and it became a haphazard mixture of unaimed rifle shots and panicked pistol rounds. Soon, all three of the filibuster columns found themselves in this struggle. Walker's hope for a quick single day battle collapsed along with the cohesion of battle. It was taking hours to secure only a few blocks of the city. As one filibuster noted, "The natives were like swarms of angered hornets, stinging and attacking us with a fiery vigor before temporarily returning to their hive." By the end of the day, the filibusters had managed to form a secure foothold, but they were also far from dislodging Guzmán and his men. Losses were high and neither side took prisoners. Walker even lost one of his lieutenants, Birkett D. Fry, who had been forced to retire to the rear when he was shot through the arm.
As September 12 dawned and the fighting resumed, more bad news faced Walker and the filibusters. Martínez had drove his men forward following the news of Walker's movements, and was expected to arrive at Managua the following day. With this news, Walker became desperate to conquer the city before Martínez's arrival, and his actions reflected it. Previously, he had ordered his men to be careful with the infrastructure of the town that he foresaw as his future capital. Now, that calculation was completely abandoned. The filibusters were given charges of gunpowder which they could throw into occupied buildings as explosives. When this began draining their supply of powder too rapidly, Walker instructed his men to simply transition to burning buildings down. These measures, of course, were disastrous both for the city and its residents with dozens of innocent civilians killed or injured and hundreds of structures damaged or destroyed. They were to be brutally effective, however. By 5:00 PM, Walker and his filibusters had conquered all but the center of the city, where Guzmán and the last of the defenders were preparing for a last stand. Hoping to avoid this, Walker would send an aide, Parker H. French, to demand their surrender. Looking at the burning husk of Managua around him and the large number of civilians within their defenses, Guzmán believed he had no choice but to surrender. His men were allowed to depart to their homes, while he himself was held as Walker's prisoner (being related to Martínez via the latter's wife).
The Battle of Managua had been costly to both sides. By final count, Walker's filibusters had lost 37 men killed and 19 wounded, while the defenders had suffered 48 killed and 23 wounded before the surrender of the garrison. The battle's ratio of killed to wounded reflected the brutal nature of the combat, with both sides usually finishing off a wounded man when they could. These men were not even buried by the time of Martínez's arrival on September 13. With the surrender of Guzmán and the garrison, however, any chance of a vast numerical superiority had vanished. Even if he were to bring every soldier under his command to the city, Martínez knew the odds would be hardly improved. Further complicating the situation, many of the soldiers who were under his command were far from eager to be assaulting the city that held their family members. Rumors had circulated through the camps that Walker had rounded up the families of soldiers under Martínez's command and were preparing to execute them as soon as any battle began. Even Martínez was susceptible to these reports because of Guzmán's captivity. Faced with this, Martínez decided that diplomacy rather than warfare might be the optimal first step.
Therefore, Martínez sent out a soldier with a white flag to request a parley. Surprised, Walker dispatched French once more to treat with the native Nicaraguans. From this first meeting, French was informed that Martínez desired to speak with Walker in order to determine a final settlement to the conflict. Eventually, such a meeting was organized for September 20. Walker along with his chief of staff A.F. Rudler would meet with Martínez, and ultimately the two sides would form a remarkable settlement. Both recognized that they were hardly in a position to confidently dislodge the other from the country. Neither, however, was willing to back down or subordinate himself to the other. Eventually, a man lost to history would point out that the three strongest men in Nicaragua--Walker, Martínez, and Jerez--each controlled one of the three largest cities in Nicaragua. From this observation grew an idea of dividing Nicaragua into three fiefdoms. One would be based around Granada under Jerez, one based around León under Martínez, and one based around Managua under Walker. Each man would be given the title of "Governor" and together would form a triumvirate executive branch.
Underlying this discussion was a realization of the inherent instability of such a design, but both parties involved in the negotiations were eager to secure the time for restrengthening that even a brief pause would bring. As a result, both Walker and Martínez would sign the Treaty of Managua on September 31, 1864. Brought to Jerez the next day, he too would attach his signature to the document, bringing it into effect. The Period of the Three Fiefdoms had begun in Nicaragua, with each of the three governors constantly watching the others and calculating his own movements accordingly. Peace had once more returned to Nicaragua, but it was tenuous at best.
The Nicaraguan Triumvirate: Martínez, Walker, and Jerez