A Boston man offered to pay a total of $8,000 to someone he thought was a contract killer, but who was actually an undercover federal agent, to have his estranged wife and her new boyfriend killed, prosecutors said Wednesday.

Mohammed Chowdhury, 46, was held at an initial hearing on a murder-for-hire charge in federal court on Tuesday pending a detention hearing scheduled for Friday, the U.S. attorney's office in Boston said in a statement.

An email seeking comment was left with his federal public defender.

BOSTON POLICE ARREST MAN FOR 2007 MURDER OF MASSACHUSETTS MOTHER

Authorities were tipped off by an informant in November that Chowdhury was soliciting assistance to have his wife killed and the informant provided his phone number to law enforcement, prosecutors said.

Massachusetts man

A man from Boston tried to hire a contract killer to kill his wife and her new boyfriend.  (Fox News)

An undercover agent posing as a contract killer then contacted him, authorities said.

BOSTON POLICE UNVEILS HOW MANY ICE DETAINER REQUESTS IT IGNORED LAST YEAR UNDER CITY'S SANCTUARY LAW: REPORT

Chowdhury met with the undercover agent and agreed to pay $4,000 per killing, prosecutors alleged.

He provided the agent with photographs of his wife and the boyfriend, told them where they lived and worked, and provided their work schedules, prosecutors said. He was apprehended Tuesday when he allegedly paid a $500 deposit.

CLICK HERE TO DOWNLOAD THE FOX NEWS APP

Chowdhury told agents his wife wouldn’t let him see his children and he wanted the killings to look like a beating and robbery, prosecutors said.