A Bronx man was fatally shot by his cousin, who pulled the trigger of a gun he thought was unloaded, police said Wednesday.

Mohammed Touray, 18, had removed the ammo magazine from his pistol before handing it to his 21-year-old cousin, Omar Turay, around 2:45 p.m. Tuesday inside Mohammed’s bedroom in an apartment on Sheridan Avenue in Concourse Village.

But Touray had racked the slide of the gun before taking the ammo out — securing a bullet into the chamber and effectively rendering the gun ready to be fired — rather than doing so after removing the magazine, which would have harmlessly ejected any leftover bullets.

Thinking the gun was unloaded, Turay accidentally fired the weapon, striking his younger cousin once in the chest, cops said, citing a preliminary investigation.

Touray’s mother and father were inside the apartment at the time.

EMS rushed the victim to Lincoln Medical Center, but he could not be saved.

Turay was arrested shortly thereafter and charged with manslaughter and criminal possession of a weapon, cops said.

The minimum age for a person to own a gun in New York State is 21.