(CNN) -- Heavy rains and flooding Wednesday prompted the closing of the Panama Canal for only the third time in its storied 96-year history.

Officials closed the canal around noon and were hoping to reopen it by Wednesday evening, Fernando Lemos, spokesman for the Panama Canal administrator, said.

"The situation might get better in the next few hours," Lemos said, "but there is no exact time as to when the canal will open again."

Lemos said most of the heavy rain was in the Chagres River area, causing water behind the Gatun Dam -- which creates Lake Gatun, a significant part of the canal -- to rise.

The last time the canal closed was in 1989, after the United States invaded Panama to topple strongman Manuel Noriega. Landslides forced the canal to close for several months from late 1915 to mid-1916, just months after it opened.

The 48-mile canal is a key conduit for shipping between the Pacific and Atlantic oceans.

The canal was built from 1904 to 1914 by the United States, which had sole control over the channel across the Panamanian isthmus until 1979.

Then, after 20 years of joint U.S.-Panama control, the Panamanian government assumed administration on December 31, 1999.