Just because you study in a country doesn't give you the right of citizenship. Most countries would let you back to finish your 4th year or pHd or whatever, but then expect you to leave if you have not applied for residency or citizenship!