Britney Spears shared a rare picture with her teenage sons, describing herself as “incredibly lucky”.

The popstar, whose life and career is back in the headlines amid a legal row with her father, posted a snap of her smiling with Sean Preston, 15, and 14-year-old Jayden, her children with ex-husband Kevin Federline.

He has custody of the boys but Spears, who suffered a public breakdown in 2008, has frequent visits.

Spears, 39, joked her sons had given her permission to post a family picture and said “it’s so crazy how time flies”.

She wrote on Instagram: “My boys are so big now !!!! I know … I know … it’s very hard for any mama especially a mama with boys seeing them grow up so fast !!!! Talk about enough to make you go to your knees … GEEZ  !!!! I’m extremely lucky because my two babies are such gentleman and so kind that I must have done something right  !!!!”

Spears posted two versions of the same picture. The original showed her and her masked sons posing in a field, while an altered snap had a dramatic sky as a background.

The singer said: “I haven’t posted pictures of them for some time cause they’re at the age where they want to express their own identities and I totally get it …. But I went out of my way to make this cool edit and guess what …. They’re finally letting me post it !!!

Britney Spears
Britney Spears has shared a rare picture of her teenage sons (Yui Mok/PA)

“Now I don’t feel left out anymore and I’m gonna go celebrate …. Oh shit I guess cool moms don’t do that … Ok I’ll just read a book instead !!!!”

Spears is currently locked in a legal row with her father, Jamie, who has overseen her estate since 2008.

She has said she will not return to the stage while he holds the role as conservator.

Lawyers for Jamie argue his handling of her affairs saved her from financial ruin.

A hearing in the case is set to take place in Los Angeles on March 17.