The Correction officer arrested yesterday for allegedly raping a niece at gunpoint claimed at his arraignment today that the sex was consensual and the violence only happened after the woman demanded cash from him.

The defense lawyer representing Eddie Colon, 49, said his client began a sexual relationship with his ex-wife’s now-31-year-old niece when she was 17 but that they stopped seeing one another about a year ago.

“We are not denying that there was sexual intimacy,” said Peter Troxler in court, adding that text messages on Colon’s phone will show the victim wanted to have a relationship with him.

Troxler said Colon and the victim had sex this week, after which she told him she wanted child support for one of her children she claimed was his – and that Colon was then assaulted from behind with a blunt object.

The hulking Colon — a 22-year-veteran of Correction — appeared in Brooklyn Criminal Court with a dark black eye.

But prosecutors described a brutal rape scene where Colon held a gun to the victim’s head, even telling one of her children their mother had gone to the store after the child yelled outside the door where he was assaulting the helpless woman.