For 16 years, Kevin Downing nursed a grudge — ranting endlessly that the federal government was wasting money and he had been wrongly fired.

Downing, 68, finally snapped Friday, shooting dead a security guard at a federal office building on Varick Street in Soho — and then taking his own life.

He saw himself as a heroic whistleblower who lost his job for calling out his bosses over a plan to build new digs in Mountainside, NJ, for the Department of Labor’s Bureau of Labor Statistics.

Downing complained for years to his congressmen and to New Jersey’s The Record newspaper. One of the pols, Rep. Bill Pascrell (D-NJ), said Downing might have had a valid complaint.

“We felt that this person had been given a raw deal, to put it mildly,” Pascrell told the Associated Press Saturday. “There was no excuse for it and he had been treated very badly.”

Downing relaunched a campaign to regain his job several years ago. He was convinced that he was protected under new legislation for federal whistleblowers. He had support from the National Taxpayers Union, which on a Web page called the Mountainside project “expensive and unnecessary.”

A Change.org petition said Downing was fired for “disclosing inexcusable taxpayer waste.” The petition claimed a “high level senator” pushed through the project after congress members tried to stop it.

When Downing appealed his firing in 1999, a judge said his complaint did not reveal gross mismanagement or waste of funds.

Downing, 68, said he was ignored because he is not a large campaign contributor.

The Department of Labor, which has an office in the building where the shooting took place, referred questions to police.

Neighbors said Downing was dealing with problems including the death of his fiancée and possibly losing his home.

“He flipped or something,” said friend Rivka Glickman. “I feel he went through a terrible crisis because he was always a very well-mannered, calm person. Something made him snap.”

Downing, a former Army Reserve captain, had been working as a real-estate agent and was described as polite, but a loner.

The security guard he killed, Idrissa Camara, is originally from the Ivory Coast. He was mourned by his family at their Harlem home Saturday night.

“He just came here for the American dream,” said his cousin and Imam Souleimane Konate.

“We are asking ourselves, ‘This is the American dream? Being killed in your job for nothing?”

The family was deciding whether he’d be buried here or in Africa.

With Post Wires