Cardi and husband Offset. (Photo: Courtesy).

American rapper Cardi B disclosed that she has filed for divorce from her husband and Migos rapper Offset this week before announcing that she is pregnant with her third child, according to US news agencies.

A representative for Cardi B said in a statement to The Associated Press that the divorce has been “a long time coming and is amicable.”

Cardi B, whose real name is Belcalis Marlenis Cephus, thanks her growing baby for helping her through a difficult time, in a post on Instagram on Thursday.

“It’s so much easier taking life’s twists, turns and test laying down, but you, your brother and your sister have shown me why it’s worth it to push through,” she posted.

The hip-hop power couple married in 2017 a month after their engagement and share two children; 6-year-old daughter Kulture and 2-year-old son Wave.

Cardi B revealed she was single and had been “for a minute now” during an Instagram live session in December.

According to CBS News, Cardi B and Migos rapper Offset had been fighting in their relation, with Cardi B filing for divorce twice previously.