Updated

The Buffalo Bills are staying in Western New York.

The team announced Friday that it had reached an agreement with Erie County and the state on a 10-year lease at Ralph Wilson Stadium.

"The Buffalo Bills are a central part of the cultural, economic, and of the entire Western part of New York State, and the state has never wavered in our commitment to keeping the Bills a thriving part of the Buffalo community," Governor Andrew M. Cuomo said.

Under the agreement, the Bills are committed to remain in Buffalo for at least seven years, regardless of ownership.

According to the Buffalo News, a hefty relocation penalty is built into the agreement. The franchise will have to pay $400 million if it leaves before 2020. In the final three years of the contract, the fee would only be $29 million.

The deal also features a total of $130 million that will be devoted to upgrading a venue that opened in 1973. The Bills will contribute $35 million to the cause. The state and county will share the remaining $95 million renovation costs, with $54 million coming from the state and $41 million from the county.

The renovations will be centered around improving the fan experience, including new video display boards on the stadium's east end and the creation of a new west end plaza.