The Memorial Bridge between Kittery and Portsmouth, N.H., will reopen within three weeks after a $30,000 repair, New Hampshire officials said Tuesday.

The cost of the temporary repair will be split by the two states, keeping the 87-year-old bridge open, said New Hampshire Transportation Commissioner George Campbell.

The bridge carries Route 1 traffic over the Piscataqua River, which separates Maine and New Hampshire. It was closed to cars and trucks Thursday after an inspection revealed deterioration of a pair of metal gusset plates, which hold bridge beams together.

Neither state wanted to spend a great deal of money on the bridge, which is due to be dismantled 18 months from now. But the repair costs were lower than expected, Campbell said.

For the time being, traffic continues to be diverted onto two other bridges between Portsmouth and Kittery.

Also Tuesday, the task force that is looking for ways to fund the replacement of the Memorial Bridge, rehabilitation of the Sara Mildred Long Bridge and maintenance of the I-95 bridge had good news.

The total cost over the next 30 years will be about $500 million, compared with estimates of $620 million as recently as two weeks ago, said Chairman Dana Connors after the task force met in Portland.

One of the recommendations calls for a reserve fund that will receive contributions from both states and draw interest until it’s needed for bridge work, he said. Interest on the account, as well as revised inflation rates, accounts for most of the $120 million in savings, Connors said.