The left-wing firebrand and former Big Brother contestant from the Workers Party of GB won 12,335 votes.
Galloway blasted Starmer throughout his Gaza-focused campaign.
He started his victory speech by saying: “Keir Starmer – this is for Gaza” before adding “Starmer’s problems just got 100 times worse than they were before today”.
Independent candidate David Anthony Tully stormed into second, with 6,638 votes.
Tory candidate Paul Simon Ellison came in third with 3,731, while disgraced ex-Labour candidate Azhar Ali came fourth with 2,402 votes. He did not appear at the count last night.
Labour abandoned candidate Mr Ali over inflammatory comments he made about Israel.
Lib Dem Iain Donaldson came in fifth with 2,164 votes, while Reform UK candidate Simon Danczuk – who was kicked out of Labour for sexting a 17-year-old – came sixth, with 1,968 votes.
Leader of Reform UK Richard Tice slammed yesterday’s by-election – which has proved to be one of the most divisive in recent years – as a “shameful contest”.
He claimed Danczuk had been subject to death threats and “vile racist abuse” while on the campaign trial.
Mr Galloway last night declared an early victory hours before the results rolled in, with his campaign manager claiming the result was set to be “better than our wildest hopes”.
Rochdale – who’s voter turnout was a substantial 39.7% – is the fifth constituency to have Mr Galloway for its MP – which is an unusual record for modern politics.
Rochdale by-election results
George Galloway Workers Party of GB – 12,335
David Tully Independent 6,638
Paul Ellison Conservative – 3,731
Azhar Ali Labour – 2,402
Iain Donaldson Liberal Democrats – 2,164
Simon Danczuk Reform – 1,968
He was previously a Labour MP, but was kicked out the party more than two decades ago over statements made on the Iraq War.
Mr Galloway based almost his entire campaign on Palestine.
He gallivanted through mosques across the constituency in an effort to seize the support of Rochdale’s Muslim population.
After being declared the winner, Mr Galloway said: “Keir Starmer – this is for Gaza. And you will pay a high price, in enabling, encouraging and covering for, the catastrophe presently going on in occupied Palestine in the Gaza strip.
“Rochdale town councillors, I put you on notice now, that I hope to put together a grand alliance…”
He added: “The councillors have to go.
“I want to tell Mr Starmer above all, that the plates have shifted tonight. This is going to spark a movement, a landslide, a shifting of the tectonic plates in scores of parliamentary constituencies.
“Beginning here in the north west, in the West Midlands, in London, from Ilford to Bethnal Green and Bow, Labour is on notice that they have lost the confidence of millions of their voters who loyally and traditionally voted for them, generation after generation.”
Last night’s ballot was held after veteran Sir Tony Lloyd died in January, days after announcing he had an incurable form of leukaemia.
Alleged death threats, candidates wearing stab vests and vandalism were only some of the incidents reported to have taken place during the campaigning.
Labour’s campaign was torpedoed days after a recording surfaced of Mr Ali speaking at a party meeting suggesting Israel was complicit with the massacre of its own people on October 7.
Though no longer backed by Labour, he remained a candidate as it was too late to withdraw his name from the ballot papers.
Another former Labour MP vying for the seat was Mr Danczuk.
The Reform candidate, who was kicked out of Labour for sexting a 17-year-old, based his campaign on a patriotic platform of “Rochdale not Gaza”.
Earlier this week a 23-year-old man was arrested after being alleged to have sent a death threat to Mr Danczuk.
The Reform candidate had to hire security guards for the last two days of campaigning.
Reform leader Mr Tice blasted: “The behaviour of certain candidates and their supporters in this contest fell very far short of this our traditional democratic standards. What we have witnessed and experienced in Rochdale is deeply disturbing.
“In recent weeks, Reform UK’s candidate and campaign team has been subjected to death threats, suffered vile racist abuse, been refused entry to hustings in a public building, had to be relocated for their own safety and suffered daily intimidation and slurs.
“In one incident, Reform UK business supporters were threatened with a firebomb attack if they distributed our leaflets.
“Menacing behaviour was a feature of the entire campaign, including outside polling stations on the day of the election itself. In this ugliest of contests, we are also concerned by the sudden increase in the size of the postal vote, which has jumped from 14,000 to some 23,000 in this constituency since the last general election.
“The results of the Rochdale by-election should act as a stark wake up call to those in power – and the entire electorate. This is Britain. We are supposed to be a beacon of democracy. This shameful contest has been more characteristic of a failed state.”