A holy war erupted yesterday at a Sikh temple in Queens — where worshippers wielding swords and cricket bats interrupted a prayer session to attack their rivals in a vicious power struggle, police and witnesses said.

Rival factions at the Baba Makhan Shah Lobana Sikh Center in South Richmond Hill have been bickering for months over control, authorities and members said.

The dispute reached a bloody climax yesterday when the infighting turned violent, accompanied by screams, taunts and death threats.

The alleged attackers — armed with at least one sword about 40 inches long, and another sword, according to a witness — were part of the old guard that had been recently voted out of power but refused to accept the decision, even going to court to challenge the election.

“We just went to pray,” said M.K. Singh, who received stitches and staples to close a head wound. “We walked inside, and they started attacking.

“They cut me. They tried to cut my arm off, but the sword got caught on [something]. I’m very lucky.”

New temple President Gurmej Singh said he and his supporters had come to pray despite knowing there could be trouble.

Police had been deployed outside the two-story center in case anything happened, but the violence broke out inside.

The attackers brought the long sword and at least one other blade, as well as a hammer, mallet and cricket bats to the temple at 101st Avenue and 114th Street at around 11 a.m., witnesses and police said.

Three people were reported injured, including a cop who tried to intervene, police said.

A witness said at least seven others were hurt as victims fought back. None suffered life-threatening injuries.

Seven people were arrested, including Harinder Singh, 47, who was charged with assault after allegedly punching a man in the eye. Others were charged with unlawful assembly, resisting arrest, rioting, and disrupting a religious service.

At the 102nd Precinct, where the suspects were processed, cops struggled to keep the two sides apart.

“Something is behind this,” said Gurmej Singh, who accused the old regime of financial mismanagement. “It’s money.”

He said the perpetrators vowed to attack again next week. Additional reporting

by Kevin Fasick

perry.chiaramonte@nypost.com

