A thief clobbered a straphanger with a hammer as he was buying a MetroCard, police said. View Full Caption NYPD

BROOKLYN — A man was buying a MetroCard in a Bedford-Stuyvesant subway station Wednesday morning when a thief came up behind him and clobbered him with a hammer before demanding cash, police said.

The 32-year-old straphanger, whose name was not released, was at a MetroCard kiosk inside the Rockaway Avenue C train station, at Fulton Street, about 9:20 a.m., when another man came up from behind, hit his head with the mallet and demanded he fork over money, the NYPD said.

The suspect, who can be seen grinning in one of the surveillance photos released by police, ran off once the victim gave up an undetermined amount of money, the NYPD said.

The victim was taken to Brookdale hospital and treated for a head injury, the NYPD said.

The suspect is believed to be about 5-foot-10 and between 130 and 150 pounds, police said.

Anyone with information should contact Crime Stoppers at (800) 577-TIPS (8477).