(Reuters) - A Connecticut man who pleaded guilty to shooting at an empty mosque near his home in an alcohol-fueled rage following the November attacks in Paris that left 130 people dead was sentenced on Friday to six months in federal prison.

Ted Hakey, 48, pleaded guilty in February to firing at least four shots at the Baitul Aman Mosque in Meriden in the early morning hours of Nov. 14, hours after learning of the Nov. 13 attacks by gunman and bombers affiliated with the Islamic State.

No one was injured in his attack.

U.S. District Judge Michael Shea sentenced him to six months in prison, according to a spokesman for the U.S. Attorney in Connecticut, who prosecuted the case. The sentence was less than the eight to 14 months that federal prosecutors had sought but more than Hakey's attorneys had recommended, which was the three weeks he had served before being released on bond.

After the hearing, Hakey thanked the mosque leadership, who urged clemency.

"I'm sincere about working with my neighbors," he told reporters outside the courthouse. "They were sincere in accepting my apology and I'm sincere that I'm going to work with them."

Hakey said he believed that this week's attack in Orlando, in which an Islamic State-inspired gunman killed 49 people in a gay nightclub in the worst mass murder in modern U.S. history, influenced the sentencing decision.

"This had a lot to do with the Orlando thing," he said.

A review of Hakey's social media postings in the hours leading up to the shooting showed a stream of anti-Muslim comments, including "the only solution is to wipe Islam off the face of the Earth," according to court documents.

(Reporting by Scott Malone; Editing by James Dalgleish)