Islamabad, Pakistan (CNN) -- Police have arrested a Pakistani teenager accused of writing insulting comments about Muslim prophet Mohammed in a school exam, a senior police official said.

Police arrested 17-year-old Sami Ullah in Karachi after receiving a complaint from the local board of education, said Karachi police official Qudrat Shah Lodhi.

Lodhi declined to say what Ullah wrote in his high school exam for fear of violating Pakistan's blasphemy laws himself.

The controversial laws say whoever defiles the name of the prophet shall be punished by death or imprisoned for life.

The laws came into sharp focus late last year when liberal Pakistani politician Salman Taseer was gunned down after leading a public campaign to change them

Taseer said the laws were being misused to persecute minorities.

Ullah -- the latest Pakistani to be accused of blasphemy -- is a Muslim, according to police.

He wrote the alleged blasphemous comments when taking a school exam in April 2010, police said.

It's not clear why it took months for the board of education's complaint against Ullah to reach police.

Ullah has apologized for his comments and begged the court for leniency, police said.

Journalist Nasir Habib contributed to this report.