Charles Baeza, 72, of Grant City, told an undercover cop he wanted to shoot and kill his girlfriend, authorities allege.

STATEN ISLAND, N.Y. -- A 72-year-old Grant City man was arrested last night after trying to buy a gun to rub out his girlfriend, authorities say — just 18 months after finishing a 20-year sentence for killing his wife.

Charles Baeza, of the 100 block of Midland Avenue attempted to purchase the weapon from an undercover detective at about 9:10 p.m., court papers said.

Baeza told the undercover cop he wanted to shoot and kill his 50-year-old girlfriend, said a spokesman for District Attorney Daniel Donovan.

He then claimed it was all a joke when cops busted him, said a law enforcement source. Authorities did not identify the woman.

The source said Baeza had apparently been plotting to bump off his girlfriend for a few weeks. The two once lived together, but the woman had kicked him out of their apartment, said the source.

He allegedly had become angry when she failed to pay back $2,000 he had laid out for her dental work, the source and cops said.

Baeza claimed to have spent $4,000 in gifts "and other stuff" on the woman, said the source.

The source said the suspect became further incensed when his beau told his parole officer that Baeza was harassing her and violating the terms of his parole by driving without a license. The suspect owns a tow truck, said police.

A third-party put Baeza in touch with the detective, said the source.

The source said there had been "talk" of Baeza hiring a hit man, but he ultimately decided against it.

"He was trying to get a gun," said the source. "He a hands-on kind of guy."

The attempted buy took place on Midland Avenue, Midland Beach, a short distance from the suspect’s home, said police.

Baeza has been free on parole since February 16, 2010, according to online records of the state Department of Corrections and Community Supervision.

He was convicted in Queens in 1992 of first-degree manslaughter and felony criminal weapon possession, stemming from the death of his estranged wife, Ruth Baeza, 52, in August 1990.

At the time, the couple lived in Franklin Square, L.I.

According to published reports, Mrs. Baeza was fatally shot four times in the head at a bus stop in Queens.

The shooting apparently stemmed from a dispute between the couple, who had been separated.

After the slaying, Baeza, then 51, stuffed the corpse in his Dodge Dart and headed south, police alleged.

He reached Fairfax County, Virginia, where a state trooper stopped him around 5 a.m. the next morning on Interstate 95.

Moments before, Baeza had nearly plowed into the officer’s cruiser on the southbound shoulder, said published reports. The trooper was writing a ticket for another motorist.

The officer chased Baeza and pulled him over near Newington.

As he started writing Baeza a ticket, the trooper saw an arm protruding from beneath some newspapers on the back seat.

He inquired who was there and Baeza said it was his wife.

Baeza then made a shocking admission when the trooper said to wake her up.