It joined NATO in 1999 and the EU five years later .