In 2001 , Qatar resolved its longstanding border disputes with both Bahrain and Saudi Arabia .