As a result of Roman persecution, the Jewish settlement in the Holy Land dwindled during the Talmudic period, while the larger community of Jews became ensconsed in Babylonia advanced in all areas. Nonetheless, the Sages of Eretz Yisrael retained the authority to sanctify months and intercalate years, as it says, “For out of Zion will go forth the Torah”(Yeshayahu, 2:3), and they dispatched messengers every month to inform the Jews residing in the Diaspora when the new month began. Only on rare occasions, like during the Beitar revolt, when the situation in the Holy Land was unbearable, and the Sages could not sanctify the months, judges ordained in Eretz Yisrael would leave the Land and journey to a place where the anti-Jewish decrees did not reach, in order to calculate the the months and the years.
Eventually, the Roman decrees intensified. As a result of Christian influence, decrees were aimed at the Sages in an attempt to stop them from sanctifying the months. During this period, the Rabbis of Eretz Yisrael sometimes had to sanctify a month while they were in hiding, and then inform the Sages of Babylonia by way of a secret letter (see Sanhedrin 12a).
Towards the end of the Talmudic period, Hillel the Second realized that the rabbinic courts of Eretz Yisrael would no longer be able to sanctify the months. He feared that hardships and evil decrees would lead to the termination of the institution of semichah. As Nasi, Hillel himself had the authority to fix the calendar, for he had inherited the presidency of the high court in a generational chain from Rabbi Yehudah HaNasi. Therefore, he and his fellow judges took the initiative and calculated the months and years forever, consecrated them in advance. Thus, in the year 4119 from creation (359 CE), the Jewish people began to count the months according to the Jewish calendar that Rabbi Hillel HaNasi established. We pray that we will soon be privileged to witness the final redemption, when the Beit Din in Jerusalem will once again sanctify the months.
The Rambam explains a very important concept, teaching that the sanctification of the months depends on the inhabitants of Eretz Yisrael, even after semichah was abolished. When the Jews of the Holy Land calculate the order of the months based on the fixed formula which Hillel used to establish the calendar, then the months are sanctified. If, however, no Jews lived in Eretz Yisrael, God forbid, the order of the months, along with all the holidays, would cease to exist. The Rambam adds, “God forbid that He should do such a thing, for He has promised us that the remnants of our nation will never be destroyed.
 The main idea is taken from the Rambam’s Hilchot Kiddush HaChodesh 5:1-3.
In Sefer HaMitzvot, Positive Commandment 153, the Rambam writes that the sanctification of the months is entrusted to the highest rabbinic court. The Ramban, however, claims that a Beit DinBeit Din of three will suffice. One could say that there is no argument here, for the Rambam means to say that the months are sanctified by virtue of the foremost court of the generation, [not that they actually have to do it].
As stated above, the months were sanctified in Eretz Yisrael, and only in dire circumstances did the greatest Rabbis of the generation, who were ordained in Eretz Yisrael, leave the Land in order to sanctify the months without interference from the hostile ruling kingdom. This is derived from a passage in Berachot 63a:
“When Chanina, R. Yehoshua’s nephew, went down to the Diaspora (after the Beitar revolt), he intercalated years and established months in Chutz LaAretz. [The Rabbis of Eretz Yisrael] sent two Torah scholars after him – R. Yosi ben Kippar and the grandson of Zechariyah ben Kevutal. When he saw them, he said, ‘Why have you come?’ They replied, ‘We have come to learn Torah.’ He proclaimed, ‘These men are [among] the greatest Rabbis of the generation, and their forefathers served in the Holy Temple…’ He began declaring [things] impure while they declared [them] pure. He forbade [certain acts] and they permitted [them]. [So] he announced, ‘These men are worthless; they are empty.’ They said to him, ‘You already built [us] up; you can no longer knock [us] down. You already built a fence; you can no longer breach it.’ He responded, ‘Why is it that whenever I declare [something] impure you declare [it] pure; whenever I forbid [something] you permit [it]?’ They answered, ‘Because you are intercalating years and establishing months outside the Land of Israel.’ He said, ‘Didn’t Akiva ben Yosef intercalate years and establish months in Chutz LaAretz?’ They replied, ‘Leave aside [the case of] Rabbi Akiva, for he did not leave behind anyone like him in Eretz Yisrael.’ He said to them, ‘I, too, left no one behind like me in Eretz Yisrael.’ They answered, ‘The kid-goats you left behind have become he-goats with horns, and they sent us to you, and this is what they told us, ‘Go, tell him in our names [to desist]. If he listens – fine. But if he does not – excommunicate him. And tell our brethren in the Diaspora [to desist as well]. If they listen – fine. But if not – let them go up to the mountain, [where] Achiyah will build an altar and Chananyah will play the harp, and everyone will deny [God], saying, “We have no portion in the God of Israel.’ [Upon hearing this], the entire congregation immediately burst into tears and said, ‘God forbid! We do have a portion in the God of Israel.’ And why all the fuss [not to establish the calendar in Chutz LaAretz]? Because it says, ‘For out of Zion will go forth the Torah, and the word of the Lord from Jerusalem’ (Yeshayahu 2:3).”
We stated above that when no ordained Rabbis exist, the months are sanctified by way of mathematical calculations. According to the Rambam, this is a halachah l’Moshe m’Sinai (a law given over to Moshe, by God, at Mt. Sinai). This is why he does not mention Rabbi Hillel HaNasi [in his discussion on the topic]. The Ramban, on the other hand, writes that there is no source for such a halachah l’Moshe m’Sinai. Rather, the truth is that in our times, as well, the months are sanctified by ordained Rabbis – that is, based on Rabbi Hillel’s calculations. Consequently, the Ramban does not require that there be Jews living in Eretz Yisrael so that the calculations can apply to them, for he holds that the months are not established based on the calculations of those currently living in Eretz Yisrael, rather, upon Rabbi Hillel’s ancient calculations. See Aruch HaShulchan 417:7.