McCartney will perform an anthem called “Freedom” to commemorate those who died in the Sept. 11 terrorist attacks – a tribute expected to be seen by 1 billion viewers.

The song is scheduled to air at the end of Fox’s pre-game festivities – just before the game begins at the Louisiana Superdome in New Orleans.

“As a sports fan, I am thrilled to have the opportunity to be involved in the Super Bowl, and as a musician, I am honored to add my voice to the message of tribute that this year’s Super Bowl will carry,” McCartney said.

The game, airing Feb. 3 on Fox, is expected to attract 130 million viewers – and another 800 million viewers worldwide.

McCartney, who was knighted six years ago, will perform “Freedom” at the Superdome along with 500 people representing the 180 countries airing the Super Bowl.

McCartney was in a plane on the runway at JFK when the two planes struck the World Trade Center on Sept. 11.

“I was sitting on a plane at New York airport and watched it unfold through the windows,” he said. “It will live with me forever.”

McCartney wrote “Freedom” to help raise money for victims of the tragedy.

Fox’s halftime show will feature Irish rockers U2, who led this year’s crop of Grammy nominees.

There will also be performances by the Boston Pops, Mary J. Blige, Marc Anthony and Mariah Carey.