BRASILIA, Brazil (AP) _ Peru and Ecuador have agreed on terms to end a border dispute that has lasted nearly 60 years, diplomatic sources said today. The deal would ease one of South America's last border flashpoints.

Presidents Alberto Fujimori of Peru and Jamil Mahuad of Ecuador will sign a peace accord on Monday here in Brazil's capital, where the negotiations took place, the sources said.

The two neighbors fought wars in 1941, 1981 and 1995 over the unmarked border in the jungle-covered Cordillera del Condor region. The full border stretches 1,050 miles through mainly jungle terrain.

The dispute centered on a remote jungle area called Tiwintza, located on a 48-mile stretch of border that was not defined in the 1942 Rio de Janeiro Protocol that set territorial boundaries.

Peace talks begin in 1995. After years of slow progress, the presidents of the two nations met in August to work out the final details.

The agreement was confirmed by sources of both countries, who asked not to be identified pending an official announcement.

Although details were not released, the accord is based on a proposal elaborated by the four peace brokers: Brazil, the United States, Argentina and Chile.

Beyond setting the boundary between the two nations, it includes an agreement security measures and on trade and navigation.

The presidents of Brazil, Argentina and Chile will attend the signing as will King Juan Carlos and Queen Sofia of Spain.

The U.S. Embassy in Brasilia said Washington had not decided whom to send.

As a condition for brokering the peace talks, the four nations involved in the talks secured approval in advance from the Peruvian and Ecuadoran congresses for any deal negotiated.