The mitzvah of challah became obligatory the minute the Jewish people crossed into Eretz Yisrael, unlike other agricultural mitzvos (e.g. terumah, ma’aser) which applied only after the Land was conquered and divided. Rashi (Kid 37a d”h chovas karka) writes that challah, like terumos and ma’asros, is a mitzvah hateluya ba’aretz, as it applies min haTorah only to wheat grown in Eretz Yisrael.
The Rambam (Terumos 1:22) writes that wheat grown in Eretz Yisrael and exported is exempt from trumah and challah because the obligation is only “shamah” in the Land, as our parsha says. However, with respect to wheat grown outside Eretz Yisrael and then imported, the Rambam writes that there is no obligation of terumah but there is an obligation to take challah. If challah is a mitzvah hateluya ba’aretz like terumah, then just as wheat not grown on the Land is exempt from terumah even if imported to Eretz Yisrael, so too such wheat should be exempt from challah?
It seems that the Rambam disagrees with Rashi’s categorization of challah as a mitzvah hateluya ba’aretz. Both terumah and challah require two conditions for there to be a chiyuv: 1) wheat being in Eretz Yisrael; 2) an act of miruach in the case of terumah (creating a haystack) to finish the process of harvesting, and the act of kneading the flour into dough in the case of challah. R' Chaim Brisker explains: by terumah, it is the fact that the wheat was grown in Eretz Yisrael which creates the obligation in terumah – the miruach is just a necessary part of the processing. Where the grain was grown outside the Land, the fact that miruach was done in Eretz Yisrael does not create a chiyuv of terumah. By challah, the situation is reversed. It is the kneading of dough in Eretz Yisrael which creates the obligation of challah irrespective of where the wheat was grown.
According to the Rambam, a mitzvah hateulya ba’aretz is a mitzvah where the obligation centers on produce of the Land, not just a mitzvah contingent upon the person performing the mitzvah being located in Eretz Yisrael.