NYPD cop Brian Mulkeen spent part of his final hour on Earth singing along to a John Denver classic — about going “home,” emotional new video shows.

Mulkeen’s police partner posted a 20-second clip online of the pair singing the nostalgic “Take Me Home, Country Roads,” in their unmarked car as they patrolled a Bronx housing project — where the tragic 33-year-old old cop would be fatally gunned down within the hour early Sunday.

“This video was taken in the last hour of Brian Mulkeens life,” his partner, identified by law-enforcement sources as Brian Mahon, wrote alongside the cell-phone footage he posted on Facebook and Instagram.

“Little did we know that we were driving into a shootout that would end tragically,” Mahon said.

“I wish I knew that this was the last song we would sing together. The last time we would be 98 [available for calls] together. The last gun we would grab together.

“Watch over us up on those country roads, I know your [sic] home.”

Mahon says in the post that he was driving the vehicle as Mulkeen sat in the passenger seat, with both men singing the song, while another officer was in the back “making fun of us and videoing.”

Mulkeen was killed when the officers, assigned to the Bronx Borough Anti-Crime Unit, got out of their vehicle to question a man amid recent gang violence in the area.

The man, Antonio Lavance Williams, 27, started running before cops could question him, prompting the officers to launch a foot pursuit. During the chase, it was clear Williams had a gun, authorities have said.

As Mulkeen and his partner attempted to apprehend Williams, Mulkeen found himself in a ferocious struggle with the ex-con at the Edenwald Houses, police officials said.

“He’s reaching for it! He’s reaching for it!” Mulkeen can be heard shouting — his last words caught on police body-camera footage — as five other officers raced to the hero cop’s aid, officials have said.

Moments later, Mulkeen was fatally shot — possibly with his own service weapon.