The Night of the Long Knives (German: Nacht der langen Messer (help·info)) or "Operation Hummingbird", or, more commonly used in Germany "Röhm-Putsch" was a purge that took place in Nazi Germany between June 30 and July 2, 1934, when the Nazi regime carried out a series of political executions. Most of those killed were members of the Sturmabteilung (SA), the paramilitary Brownshirts.
Hitler moved against the SA and its leader, Ernst Röhm, because he saw the independence of the SA and the penchant of its members for street violence as a direct threat to his power. He also wanted to conciliate leaders of the Reichswehr, the official German military who both feared and despised the SA—in particular Röhm's ambition to absorb the Reichswehr into the SA under his own leadership. Finally, Hitler used the purge to attack or eliminate critics of his regime, especially those loyal to Vice-Chancellor Franz von Papen, and to settle scores with old enemies.
At least 85 people died during the purge, although the final death toll may have been into the hundreds,<2><3> and more than a thousand perceived opponents were arrested.<2> Most of the killings were carried out by the Schutzstaffel (SS) and the Gestapo (Geheime Staatspolizei), the regime's secret police. The purge strengthened and consolidated the support of the Reichswehr for Hitler. It also provided a legal grounding for the Nazi regime, as the German courts and cabinet quickly swept aside centuries of legal prohibition against extra-judicial killings to demonstrate their loyalty to the regime.
http://en.wikipedia.org/wiki/Night_of_the_Long_KnivesFor public relations purposes, and especially to quell the outrage felt throughout the ranks of the SA, Hitler justified his blatant power play by pointing to Rohm's homosexuality. Hitler, of course, had known of Rohm's homosexuality since 1919, and it became public knowledge in 1925, when Rohm appeared in court to charge a hustler with theft. All this while the Nazi Party had a virulently antigay policy, and many Nazis protested that Rohm was discrediting the entire Party and should be purged. Hitler, however, was quite willing to cover up for him for years until he stood in the way of larger plans
http://www.jewishvirtuallibrary.org/jsource/Holocaust/Homosexuals_and_the_Third_Reich.html