A sanitation worker from the Rockaways will have to pay back over half a million dollars to three city agencies after fraudulently collecting benefits under his deceased twin brother’s name for nearly two decades.

Thomas Murphy, 54, pleaded guilty to grand larceny and falsifying business records, the office of the New York State Welfare Inspector General announced on Jan. 24.

In October 1994, an investigation by Inspector General Leahy Scott revealed, Murphy began to use the Social Security number of his deceased twin brother, Robert, who passed away in 1962 shortly after his birth, to collect benefits. In an effort to conceal his dual identity, Murphy maintained separate addresses, bank accounts and driver’s licenses in his deceased brother’s name.

He continued to impersonate his brother and collect public benefits totaling $581,805.80 from Medicaid, the Supplemental Nutrition Assistance Program (SNAP), the Social Security Administration and state rental subsidies through November 2013.

As an employee of the Department of Sanitation since 2006, earning an annual salary of $72,000, Murphy was otherwise ineligible to receive these public benefits, the investigation also concluded.

“This defendant led a double life for nearly two decades in order to steal public assistance benefits meant for those who are truly in need,” Inspector General Leahy Scott said. “This public servant lived a life of lies to egregiously supplement his taxpayer-funded income with public funds to which he was not entitled.”