His only sin was praying.

A 10-year-old Brooklyn boy recited a Muslim prayer in Arabic to help him find his MetroCard on a city bus — prompting the hellish driver to call him a “terrorist” and toss him off, a new lawsuit charges.

The prayer is a common Muslim phrase used sometimes in the face of a challenge.

“[The child] said it as he was trying to find his card so he could get” home, said Hyder Naqvi, lawyer for the boy and his family.

‘He’s a young boy, but he’s old enough to know what discrimination is.”

The disturbing incident occurred as the child was boarding the B-39 bus on his way home from school in Sheepshead Bay around 2:45 p.m. in October 2012, according to the Brooklyn Federal Court suit.

The flustered boy couldn’t find his card and sought a little divine assistance.

“I start in the name of God, the most merciful, the most beneficent,” the boy said, according to the suit.

The plea worked. The boy found his card and started to board again.

But the unidentified driver had a racist melt-down as soon as he heard the Arabic, spewing the slur and forcing the boy back and closing the doors, the suit says.

When the child got home, “he told his parents what happened, and they were obviously upset by it,” Naqvi told The Post.

MTA reps met with them and provided pictures of various drivers to identify the accused bigot — but the family was never told who the person was, the lawyer said.

“They decided at that point to seek counsel,” Naqvi said.

Charging religious discrimination and civil-rights abuses, the family is suing the agency and the driver for unspecified damages.

The MTA declined comment.