It took 30 years, but the Irish bartender from the Shamrock Bar on Jamaica Avenue in Queens has finally remembered who shot two of the owners dead on that fateful night back in April of 1981.

The nature of the killings -- involving several reputed organized crime figures -- apparently had something to do with the bout of amnesia Joseph Patrick Sullivan endured since the grisly slayings.

“I was afraid,” Sullivan reportedly admitted during testimony last week.

For years, Sullivan had claimed he didn’t know anything about the killings that left Shamrock owners Richard Godkin and John D’Agnese dead after an altercation with three men turned violent.

When asked on the stand why he lied for so many years, Sullivan said, “Two men were dead over a spilled drink. That was reason enough to be afraid. I didn’t want to get hurt.”

Even the victims in this case had interesting, if not criminal, connections. D’Agnese was said to be dating a girl named Linda, whose bold-faced last name was Gotti. She was also present at the Shamrock that evening.

Linda Gotti -- niece of late, long-time, Queens-based crime boss John Gotti -- also suffered from amnesia following the Shamrock Bar killings, though she too was also expected to testify in the ongoing federal case against Bartolomeo Vernace, believed to be one of the triggermen who left Godkin and D’Agnese dead.

For years, it is said that various Gotti family members, uh, encouraged Linda to think really hard about what she may or may not have seen that night.

Now, though, the gruesome events at the Shamrock Bar are coming into clearer view, thanks to the passage of time.

All involved agree that April 11, 1981, was “western night” at the Irish watering hole on Jamaica Avenue in the Richmond Hill section of Queens.

It was the bad old days in New York. There were over 1,800 murders in the city that year. There were 414 murders in 2012.

“A girl was making a scene,” the 55-year-old Sullivan testified last week, following the infamous spilled drink. “She started going into a big tirade about how her dress was forever ruined.”

The woman’s boyfriend was named Frank Riccardi. In certain circles he was known as “The Geech.”

Riccardi as well as Bartolomeo Vernace and Ronald (known as “Ronnie the Jew”) Barlin were long rumored to be the ones who settled the score over the spilt drink. They confronted the patron who supposedly did the spilling.

Godkin and D’Agnese -- who was just 22 at the time -- intervened. They were shot and killed.

Way back in 1981, two Irish American cops at the precinct on 118th Street, Lieutenant Dan Kelly and Detective Bill Gill, said several witnesses had identified Barlin as one of the accomplices. Barlin, who had previously been arrested following the shooting of an FDNY lieutenant in 1960, was arrested and detained, but none of the charges against any of the three could stick.

Sullivan had a chance to put Vernace behind bars at the 1998 trial for the killings of D’Agnese and Godkin. However, Sullivan could not help but notice certain men sitting in the courtroom.

He described them as “big” with “slicked-back hair.” He also noticed they seemed to have “no neck.”

That and various other hints scared Sullivan, and he chose not to testify against Vernace.

Even law enforcement officials were sympathetic to Sullivan’s plight.

According to the New York Post, an unnamed NYPD detective suggested that Sullivan change his phone number.

“He said he had children my age and . . . he didn’t want to see me get hurt,” Sullivan recalled. “So he said, ‘I’ll tell them I couldn’t find you.’”

As Sullivan finally told the truth on the witness stand this week, Richard Godkin’s widow was also in the courtroom, crying. Godkin was a Vietnam vet and he, as well as D’Agnese, had deep ties to their local Queens community.

At the time of their death, both worked for the South Queens Boys Club, which today is the South Queens Boys and Girls Club on Atlantic Avenue.

Now that bartender Joseph Patrick Sullivan has stared down his demons and belatedly testified, the victims’ families can maybe, maybe, put this tragic story from New York’s bad old days behind them.