NEW YORK — Even before Frank Ocean released his albums “Endless” and “Blonde” on Apple Music last month, he and his label decided the relationship was over.

A person familiar with the situation told The Associated Press that Ocean’s label, Def Jam, decided to let the singer out of his contract early because the relationship between the singer and the label was like a “bad marriage.” The person, who spoke on the condition of anonymity because the person was not allowed to publicly speak about the topic, did not say how many albums Ocean was contracted for, but added that “it wasn’t going to work out.”

“He didn’t want to be on a label. He wanted to do his own thing,” the person said.

Representatives for Ocean didn’t respond to emails seeking comment and a rep Def Jam declined to comment.

Ocean, one of the most heralded young artists of the last few years, released the Grammy-winning “channel ORANGE” on Def Jam in 2012, marking his debut as an act on the label, also home to Kanye West, Rihanna and Justin Bieber, among others.

But it took years for the follow-up to be released. While fans were antsy, behind the scenes, the relationship between the label and Ocean got fractious — so much so both parties decided that Ocean’s next album would be his last, according to the person.

“I’m sure there was some kind of negotiation in order for him to get out of the contract if there were remaining commitments on the contract,” the person said.

Ocean, 28, released the visual album “Endless” through Def Jam — his final project for the label — and it is available on Apple Music as one entire project but not as individual songs, nor is it on sale for commercial consumption. A day after, he released “Blonde,” his 17-track album featuring songs with Beyonce and Kendrick Lamar — a surprise to his former label. “Blonde,” referred to as the “real album,” debuted at No. 1 on the Billboard 200 albums chart.

“It was delivered right at the last minute,” the person said of “Blonde.”

Def Jam is a subsidiary of Universal Music Group, which also the home to labels such as Interscope Records (Lady Gaga, Eminem), Republic Records (The Weeknd, Ariana Grande) and Capitol Records (Sam Smith, Katy Perry).