What a clown.

Cops busted a Brooklyn man fiddling with a gun and a creepy clown mask inside a city government office after a frightened witness called 911 to report him, police said Tuesday

Rahmeek Younger, 30, was at the Human Resources Administration offices at 505 Clermont Ave. around 3 p.m. Monday when he was seen playing with a gun that was in an open bag — along with the “Pennywise” mask, cops said.

Responding police officers tried to arrest him but he resisted. The officers used a Taser to subdue Younger, who ultimately was busted with a loaded .22-caliber Ruger and additional ammunition, officials said.

Younger was charged with criminal possession of a weapon, resisting arrest and obstruction of governmental administration.

He has seven prior arrests, police sources said.

The arrests included an armed robbery in Williamsburg, Brooklyn, from 2006, the sources said. During that crime, Younger, who was 16 at the time, pointed his firearm at a victim and stole an iPod. He kicked and punched cops who responded and arrested him, according to sources.

He was also busted for criminal possession of a loaded firearm in 2012, the sources said.

Police from the NYPD’s 88th Precinct posted a photo of the gun and mask — which resembles Pennywise the clown from Stephen King’s “It” — on Twitter.