A Muslim family from Long Island slapped the owners of the Empire State Building Tuesday with a scathing $5 million lawsuit that claims they were booted from the building’s observation deck for praying.

Fahad and Amina Tirmizi of Farmingville said their civil rights were violated when they were “assaulted, battered and forcibly removed” from the famed observatory last July.

The suit, filed against Malkin Properties, security company Andrews International Inc. and others, claims that Fahad, 32, and his 30-year-old wife were unfairly targeted because they were Muslim and wearing traditional Muslim attire.

“We weren’t doing anything wrong,” Fahad said. “We just wanted to enjoy the view like everyone else.”

The couple and their two children were on the 86th-floor outside deck when they walked over to a quiet spot to recite evening prayers, the suit says.

Although Amina briefly prayed without incident, a security guard quickly confronted Fahad and “menacingly poked” him and loudly told him he was not allowed to pray on the deck.

Another guard joined the fray and told all the family members that they had to leave, and “forcibly escorted” them down to the lobby and out of the of the building, the suit says.

Fahad told The Post that he has prayed in public before and tries to be respectful.

“Earlier that same day at the Staten Island Ferry terminal, I needed to pray the afternoon prayer and wanted to make sure I’m not in the way,” ­he said.

“I confirmed with a police officer who was standing right there to make sure it was a good spot. The officer responded, ‘Go for it, it’s not illegal to pray.’ ”

The Tirmizis’ lawyer, Phil Hines, said the family outing became an experience of intolerance.

“To most, the Empire State Building is one of the great landmarks of this city, but for my client and his family, it is a building of ignorance and injustice,” Hines said.

“A family trip to enjoy the cityscape was cut short after security officials threw them out of the building for exercising their religious beliefs.”

Representatives for Malkin Properties did not immediately return messages.