The agreement is seen as a major concession to the US President Donald Trump, who has threatened to "take back" the important trade route.
The agreement, announced on Thursday, allows American military personnel to be stationed at Panama-controlled facilities for training, exercises, and "other activities". However, the agreement does not allow the US to build its own permanent bases – which would be deeply unpopular among Panama's inhabitants and legally sensitive.
On Wednesday, the US Defense Minister Pete Hegseth visited Panama and met with the country's President José Raúl Mulino. During the meeting, Mulino reportedly said that American bases, as allowed under an earlier draft, were "unacceptable".
Since US President Donald Trump returned to power in January, he has repeatedly claimed that China has too much influence over the canal.
His administration has promised to "take back" control over the strategic trade route, which the US financed, built, and controlled until 1999.