Berakhot 21b
ברכות כ״א ב — ד"ה אָמַר רַב הוּנָא
Berakhot 21b:2
The sugya discusses the relationship between individual and communal prayer and the repetition of prayer, providing the Talmudic foundation for the communal Amidah and its public recitation.
אָמַר רַב הוּנָא: הַנִּכְנָס לְבֵית הַכְּנֶסֶת וּמָצָא צִבּוּר שֶׁמִּתְפַּלְּלִין, אִם יָכוֹל לְהַתְחִיל וְלִגְמוֹר עַד שֶׁלֹּא יַגִּיעַ שְׁלִיחַ צִבּוּר לְ״מוֹדִים״ — יִתְפַּלֵּל. וְאִם לָאו — אַל יִתְפַּלֵּל. רַבִּי יְהוֹשֻׁעַ בֶּן לֵוִי אָמַר: אִם יָכוֹל לְהַתְחִיל וְלִגְמוֹר עַד שֶׁלֹּא יַגִּיעַ שְׁלִיחַ צִבּוּר לִ״קְדוּשָּׁה״ — יִתְפַּלֵּל, וְאִם לָאו — אַל יִתְפַּלֵּל.
Rav Huna said: One who did not yet pray and enters a synagogue and found that the congregation is in the midst of reciting the Amida prayer, if he is able to begin and complete his own prayer before the prayer leader reaches the blessing of thanksgiving [modim], he should begin to pray, and, if not, he should not begin to pray. Rabbi Yehoshua ben Levi said: If he is able to begin and complete his prayer before the prayer leader reaches sanctification [kedusha], then he should begin to pray. If not, then he should not begin to pray.