The Gemara discusses the earliest time for Shema and the Amidah. It distinguishes between the ideal times for prayer and the permitted windows around dawn and sunrise, which is central to praying Shacharit before sunrise.
מַתְנִי׳ מֵאֵימָתַי קוֹרִין אֶת שְׁמַע בְּשַׁחֲרִית? מִשֶּׁיַּכִּיר בֵּין תְּכֵלֶת לְלָבָן. רַבִּי אֱלִיעֶזֶר אוֹמֵר: בֵּין תְּכֵלֶת לְכָרָתֵי. וְגוֹמְרָהּ, עַד הָנֵץ הַחַמָּה, רַבִּי יְהוֹשֻׁעַ אוֹמֵר עַד שָׁלֹשׁ שָׁעוֹת, שֶׁכֵּן דֶּרֶךְ מְלָכִים לַעֲמוֹד בְּשָׁלֹשׁ שָׁעוֹת. אָמַר רַב הוּנָא: הֲלָכָה כַּאֲחֵרִים. אָמַר אַבָּיֵי: לִתְפִילִּין כַּאֲחֵרִים. לִקְרִיאַת שְׁמַע כְּוָתִיקִין. דְּאָמַר רַבִּי יוֹחָנָן וָתִיקִין הָיוּ גּוֹמְרִין אוֹתָהּ עִם הָנֵץ הַחַמָּה. תַּנְיָא נָמֵי הָכִי: וָתִיקִין הָיוּ גּוֹמְרִין אוֹתָהּ עִם הָנֵץ הַחַמָּה, כְּדֵי שֶׁיִּסְמוֹךְ גְּאוּלָּה לִתְפִלָּה, וְנִמְצָא מִתְפַּלֵּל בַּיּוֹם.
MISHNA: From when does one recite Shema in the morning? From when a person can distinguish between sky-blue [tekhelet] and white. Rabbi Eliezer says: From when one can distinguish between sky-blue and leek-green. And one must finish reciting Shema until the end of the period when you rise, i.e., sunrise, when the sun begins to shine. Rabbi Yehoshua says: One may recite the morning Shema until three hours of the day, which this is still considered when you rise, as that is the habit of kings to rise from their sleep at three hours of the day. Rav Huna said: The halakha is in accordance with Aḥerim. Abaye said: Regarding the time from which one may don phylacteries, a mitzva incumbent only by day, the halakha is in accordance with Aḥerim. But with regard to the recitation of Shema, one should conduct himself in accordance with the custom of the vatikin, pious individuals who were scrupulous in their performance of mitzvot. As Rabbi Yoḥanan said: The vatikin would conclude the recitation of Shema with sunrise, and one should act accordingly. It was also taught in a baraita: The vatikin would conclude the recitation of Shema with sunrise in order to juxtapose the blessing of redemption, which immediately follows the recitation of Shema, with prayer, and pray during the day.