meža (Latvian) comes from Russian межа́, from Proto-Slavic meďa, from Proto-Indo-European médʰyos, from Proto-Indo-European medʰi-, from Proto-Indo-European me — in the middle of, near, by, around, with.
meža (Latvian): genitive singular form of mežs; forest