"The secretary-general is following with deep concern the current tensions between Azerbaijan and Armenia. He calls for maximum restraint, as a full conflict between these two countries would be disastrous," UN spokesman Stephane Dujarric said.
The neighbors have long been in conflict over Azerbaijan's breakaway, mainly ethnic Armenian region of Nagorno-Karabakh. But the latest flare-ups are around the Tavush region in northeastern Armenia, some 300 km (190 miles) from the enclave.
Russia, which has a military base in Armenia, has urged the two sides to cease fire and show restraint. The Kremlin has said Moscow is ready to act as a mediator.
International concern is heightened because of the threat to stability in a region serving as a corridor for pipelines taking oil and gas from the Caspian Sea to global markets.