Two women were raped inside their Bronx apartment buildings in unrelated attacks, cops said Wednesday.

In the first, a man got into the elevator of the 27-year-old victim’s University Heights building on Feb. 21 and raped her in a fifth-floor stairwell.

In the second assault, a man knocked on the door of the victim’s Bedford Park apartment on March 24, claimed to be the building’s super and said he needed to fix an emergency gas leak, police said. The woman, 25, opened the door, and the man burst in waving a gun and raped her.