A rookie NYPD officer’s buddy grabbed his gun to take a look while the two played video games on Easter morning — but he ended up killing himself when it accidentally went off, police sources told The Post Monday.

Housing Bureau Officer Martinson Afariyeboah allegedly set his gun on a coffee table inside his pal Frederick Afoakwah’s high-rise apartment on Mosholu Parkway near Jerome Avenue during a pre-dawn session of FIFA Soccer Sunday, according to police sources and the victim’s father.

The 21-year-old neighbor — who lives next door to the officer, on the building’s 17th floor — picked up the gun to “inspect it” and it accidentally discharged, according to police. He fired one bullet into his own neck, waking up his parents, who were asleep nearby.

“I came out and I saw my son laying on the floor…There was blood all over the rug and the sofa,” said Afoakwah’s heartbroken father, Ransford Afoakwah, 55. “He wasn’t speaking.”

His son was rushed to St. Barnabas Hospital, where he died soon after.

Officer Afariyeboah was suspended from duty without pay as the Internal Affairs Bureau probes whether he failed to properly secure his weapon.

Not long before the gun went off, Ransford Afoakwah had urged his son to turn off the video game and go to bed because the family had plans to go to an early Easter mass, he said.

“I woke up and I saw them playing still and I said, ‘Why don’t you go to bed?” he said. “After that I heard the noise from the gun pop.”

As his son bled profusely, he tried to perform CPR to no avail. He called the incident “an accident.”

“It’s pretty tragic, and pretty stupid,” a police source said.

“It was in the the middle of the night. He took his gun and put it on an end table, and his friend took the gun and shot himself in the neck,” a high-ranking police source said.

When reporting the incident, Afariyeboah’s story was “not consistent,” the source said.

Afariyeboah could not be reached at his home Monday. His mother told The Post he hails from Ghana and had been working for the NYPD for six months.

-Additional reporting by Natalie O’Neill