U2 have spoken about their long history with former South African president Nelson Mandela at a New York premiere for Mandela: Long Walk To Freedom.

The film is largely based on his autobiography of the same title.

It traces Mr Mandela's life from his childhood, through his imprisonment on Robben Island, to his election as the country's first black president in 1994.

U2 co-hosted last night's event and wrote a song for the film, which The Edge called a full-circle moment.

The Edge said he was proud to be part of the project, adding: "It's just an incredible thing that we were asked to write this song for this movie. We've been working for Madiba since we were teenagers. And so it's kind of coming full circle now."

Bono recalled the last time he met Mr Mandela.

He said: "He always says the same thing when you go and see him. 'O', he says, you know, he says, 'you come to visit an old man like me, why would you do that?'

"You know, you're struck by his humility and his humour, they are the two things. But seeing my two kids, seeing him play with my kids is something I'll always remember."

On composing a song for the film, Bono said that Mr Mandela was "a big part" of their lives.

"Not just the anti-apartheid stuff, or all this sort of make poverty history stuff that we did with them. Even RED, the fight against AIDS. It's just a huge part of our life and it's just not - we just didn't want to blow it."

Last week, Mr Mandela's condition was described as stable but critical more than two months after hospital doctors treating him for a lung infection let him return home to convalesce.

The former president was still "quite ill" and unable speak because of tubes in his mouth to clear fluid from his lungs, his ex-wife Winnie Madikizela-Mandela said.

The anti-apartheid leader spent 87 days in a Pretoria hospital before returning to his Johannesburg family home in September.

He is receiving round-the-clock treatment from 22 doctors and is said to be using facial gestures to communicate.

The 95-year-old made his last public appearance waving to fans from the back of a golf cart before the Soccer World Cup final in Johannesburg in 2010.