NexLevel wrote:as a tourist, you need to get a document from SUNAT giving you permission to sign a contract.
No, I believe it needs to be a stamp in your passport that gives you a ''special permission to sign a contract'' legally. This you can only do in Migraciones which is close to the end of Av. Brasil in Lima. Costs about US$50. (there may be some places outside of Lima, not sure)
Here's the form. Print it and complete it
http://www.digemin.gob.pe/formularios/f-004.pdfAfter you have this stamp and you later want to leave the country, THEN you get the document from SUNAT saying that you do not owe taxes in Peru and are free to leave.
If buying land is the same as buying a property i.e apartment, then this info is 100% correct.