Plato wrote in "The Symposium":
"If there was any mechanism for producing a city or army consisting of [male] lovers and boyfriends, there could be no better form of social organisation than this; they would hold back from anything discraceful and compete for honour in each others' eyes. If even small numbers of such men fought side by side, the could defeat virtually the whole human race. The last person a lover can bear to be seen by, when leaving his place in the battle-line or abandoning his weapons, is his boyfriend; instead he'd prefer to die many times. As for abandoning his boyfriend or failing to help him in danger - no one is such a coward that he could not be inspired to courage by love and made the equal of someone who's naturally very brave."
Such an army did exist in Thebes, they were the elite of the Theban army, known as the Theban Band, and the idea for the regiment was inspired by Plato, but they were massacred at the Battle of Chaeronea in 338 BC, the decisive contest in which Philip II of Macedon (with his son, Alexander the Great, as he would later be known) extinguished the authority of the Greek city-states. The traditional Greek hoplite infantry were no match for the novel long-speared Macedonian phalanx: the Theban army and its allies broke and fled, but the Sacred Band, though surrounded and overwhelmed, refused to surrender. They held their ground and fell where they stood.
Before defeat the Theban Band had vanquished the Spartan army three times larger at Tegyra in 375 BC.