FILE PHOTO: An AT&T logo and communication equipment is shown on a building in downtown Los Angeles, California October 29, 2014. REUTERS/Mike Blake/File Photo

((This Dec. 29 story corrects a typo in the headline))

NEW YORK (Reuters) - AT&T Inc said on Friday that all 50 U.S. states had decided to participate in the nationwide broadband network it is building for first responders as part of a $6.5 billion government contract.

In March, the U.S. government awarded a contract to AT&T to build the network, years after a federal commission recommended setting up such a system following the 9/11 attacks.

The No. 2 U.S. wireless carrier will receive 20 megahertz of wireless airwaves and success-based payments of $6.5 billion over the next five years as part of the project known as FirstNet. AT&T expects to spend about $40 billion over 25 years to build and maintain the network.

States had until Thursday to opt out of AT&T’s network and build their own public safety networks. In addition to the states, Washington, D.C., Puerto Rico and the U.S. Virgin Islands also opted for FirstNet, AT&T said. Decisions from the three Pacific territories of American Samoa, Guam and Northern Mariana Islands are not due until March 12, 2018.

Wall Street analysts have said FirstNet is a way for AT&T to add to its portfolio of wireless airwaves, or spectrum, at a time when consumers are using more data on their cell phones. The company can use the spectrum it receives from the U.S. government to provide more network capacity for wireless customers when it is not in use by emergency responders.