HELENA, Mont. (AP) — The U.S. Postal Service has agreed to reverse changes that slowed mail service nationwide. The agreement settles a lawsuit filed by Montana Gov. Steve Bullock.

The lawsuit filed against Postmaster General Louis DeJoy and the U.S. Postal Service argued changes implemented in June harmed access to mail services in Montana.

The Postal Service agreed to reverse all changes, which included reduced retail hours, and removal of collection boxes and mail sorting machines. The agreement also requires the Postal Service to prioritize election mail.

The settlement agreement reached in the U.S. District Court in Great Falls applies to all states.