PORTSMOUTH, N.H. — A bridge that connects Maine and New Hampshire is scheduled to be closed at night for several weeks of repairs.

Work is to start about July 9 on the Sarah Mildred Long Bridge to install a barrier system to replace a corroded guardrail. The work would be completed Aug. 1.

The cost of the nearly $1 million contract will be split between Maine and New Hampshire.

The Portsmouth Herald reports the work was required after a study of the bridge indicated the existing guardrail was so rotten it posed a safety risk.

The work will be done at night to minimize inconvenience to travelers who use the bridge, which connects Portsmouth and Kittery.