BUFFALO, N.Y. -- Gov. Andrew Cuomo and Seneca Indian President Barry Snyder Sr. celebrated the end of a four-year dispute over gambling rights Wednesday by handing out oversized checks for casino funds that were withheld from three western New York cities during the conflict.

The state and Seneca leaders made stops in Niagara Falls, Buffalo and Salamanca, where the Senecas operate casinos under an agreement with the state that requires them to share slot-machine revenues with the state and three host communities.

"For years the Seneca Nation and state government were mired in a disagreement over gaming revenues for local communities, but with today's ceremony we are turning a new page in that narrative," Cuomo said in Salamanca while delivering a check for $34.5 million in overdue funds.

Niagara Falls, which has struggled under the loss of income, received the biggest check: $89 million. Buffalo's share of slot-machine profits was $15.5 million.

Cuomo and Snyder announced an agreement in June under which the Senecas agreed to resume sharing casino revenues and the state promised to protect Seneca casinos against future gambling competition in the region.

The Senecas had said the placement of video lottery terminals inside three non-Indian racetracks, which then marketed themselves as casinos, violated a clause in the contract guaranteeing the Senecas exclusive rights to operate casinos in the region. The racetracks will continue to operate but cannot call themselves casinos.

Snyder thanked Cuomo for "recognizing the Seneca Nation's gaming enterprises as an important component for continuation of our region's growth and transformation."

The agreement gives the cities full back pay. Also, the state will receive about $408 million and the Senecas will retain $209 million in withheld revenues and resume making regular annual payments to the state.

New York's state Legislature completed its 2013 session in June by approving four Las Vegas-type casinos for upstate. The casinos could be located in the regions around Albany, Binghamton and the Catskills-Hudson Valley area, but not in western New York, where the Seneca casinos operate.