This case presents two issues. The first is whether a judge in the Superior Court erred in ordering the dismissal of an age discrimination complaint filed with the Massachusetts Commission Against Discrimination (commission) for lack of subject matter jurisdiction before a final decision had been reached by the commission. The second is whether the “ministerial exception” required by the First Amendment to the United States Constitution prohibits a court or administrative agency from applying our State antidiscrimination laws to the decision of a Jewish temple not to rehire a teacher in its Sunday and after-school religious school. We conclude that the judge erred in deciding whether the “ministerial exception” barred the discrimination claim before the commission had entered a final decision on the claim. We nonetheless affirm the dismissal of the complaint because, relying solely on facts not in dispute, we conclude that the ministerial exception bars the claim of discrimination.
Background. Temple Emanuel of Newton (Temple), a Conservative Jewish congregation of over 1,100 families, operates the synagogue-based Rabbi Albert I. Gordon Religious School (religious school). The religious school is an after-school and Sunday program for children in kindergarten through seventh grade. Gaye Hilsenrath was a part-time teacher at the religious school for over twenty-four years. Like all teachers at the religious school, Hilsenrath was employed on a part-time basis pursuant to a yearly letter of appointment. During the 2006-2007 school year the religious school employed approximately twenty part-time teachers, including Hilsenrath.
In 2007 the Temple began to review and change the religious school in response to declining enrollment and dissatisfaction with the religious school among the congregation. Under its new staffing model, the religious school reduced the number of teachers from approximately twenty to twelve, each of whom *474would teach all subjects in kindergarten through fifth grade.1 In January, 2008, the Temple notified the teachers who were then employed by the religious school that they could apply for one of the twelve teaching positions for the 2008-2009 year. Ten of the twenty teachers then on staff, including Hilsenrath, applied for teaching positions. Hilsenrath was not offered a position.
On August 4, 2008, Hilsenrath filed a complaint against the Temple with the commission. In the complaint she alleged that she had been subjected to harassment and discrimination on the basis of her age, and that she was not rehired by the religious school because of her age. A commission investigator advised the Temple by letter that it was required within twenty-one days to submit a formal written answer to the complaint, described as a position statement, with a full description of its defenses, signed under the pains and penalties of perjury.2 The investigator also provided the Temple with interrogatories and document requests that required the Temple to answer, among other questions, whether Hilsenrath was terminated from employment and to provide the reasons for her “separation from employment.” The Temple filed a motion with the commission to dismiss the complaint for lack of subject matter jurisdiction based on the First Amendment, and a separate motion to stay the filing of the position statement and responses to the commission’s discovery requests until the motion to dismiss was decided. On January 30, 2009, the investigating commissioner denied the Temple’s motion to dismiss without prejudice and without a statement of reasons. The Temple appealed from the denial to the full commission. On April 10, 2009, the investigating commissioner denied the appeal, again without a statement of reasons.3 On April 27, 2009, the investigating commissioner denied the *475Temple’s motion to stay, and the commission ordered the Temple to file its position statement in response to the complaint within twenty-one days.
On May 11, 2009, the Temple filed a complaint against the commission in the Superior Court seeking a judgment declaring that the First Amendment prohibits the commission from exercising subject matter jurisdiction over the claims in the complaint, and an order directing the commission to dismiss the complaint.4 The Temple also moved for a preliminary injunction prohibiting the commission from exercising subject matter jurisdiction over the complaint, and staying administrative proceedings pending final adjudication of the declaratory judgment action. The commission moved to dismiss the Temple’s complaint.
A judge in the Superior Court denied the commission’s motion to dismiss and entered judgment in favor of the Temple. The judge recognized that “G. L. c. 151B confers upon [the commission] the authority to investigate and act upon complaints of discrimination without judicial interference unless and until [the commission] has made a final decision in an adjudicatory proceeding.” But the judge determined that, in “extraordinary circumstances,” where the exhaustion of administrative remedies would prove futile, where the only question is one of law, and where irreparable harm would result if judicial action were delayed, a judge in the Superior Court may enter a declaratory judgment while an administrative proceeding is pending and before an agency’s final decision. The judge concluded that this was one of those rare cases where these extraordinary circum*476stances were present. The judge found that exhaustion of administrative remedies would be futile because “there can be no doubt that [the commission] has made a final determination . . . that it has [subject matter] jurisdiction,” and “intends to delve into the decision making thoughts and processes of the leadership of the Temple.” The judge also found that the question of subject matter jurisdiction was one of law. Finally, the judge found that irreparable harm would arise from delay because the commission’s attempt to conduct discovery and subject the Temple to the full adjudicatory process would itself be a constitutional violation if the employment decision were protected by the ministerial exception. The judge concluded that the employment decision here was protected by the ministerial exception because “Hilsenrath’s role as teacher at the religious school simply cannot be extracted from the school’s overall religious mission and integration” into the synagogue. The commission appealed, and we transferred the case on our own motion.
Discussion. 1. Ministerial exception. The First Amendment provides, in part, “Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof . . . .” When judgment was issued in this case, the United States Courts of Appeals “uniformly recognized the existence of a ‘ministerial exception,’ grounded in the First Amendment,” that precludes the application of Federal antidiscrimination law under Title VII of the Civil Rights Act of 1964, 42 U.S.C. §§ 2000e et seq. (2006), to the employment relationship between a religious institution and its ministers, but the Supreme Court of the United States had yet to consider the issue. Hosanna-Tabor Evangelical Lutheran Church & Sch. v. EEOC, 132 S. Ct. 694, 705 & n.2 (2012) (Hosanna-Tabor) (collecting cases).
This court, too, recognized that the First Amendment precludes application of State antidiscrimination law to employment decisions made by religious institutions regarding their ministers. Where an Episcopal priest had filed suit under G. L. c. 15IB claiming discrimination on the basis of gender, we affirmed that the case should be dismissed for lack of subject matter jurisdiction. Williams v. Episcopal Diocese of Mass., 436 Mass. 574, 577, 583 (2002). We noted that the principle that the First Amendment “precludes jurisdiction of civil courts over *477church disputes touching on matters of doctrine, canon law, polity, discipline, and ministerial relationships is firmly established in Massachusetts case law.” Id. at 579, and cases cited. We concluded that a dispute over a priest’s discharge from employment is “a quintessential example” of a church dispute that a court could not examine “without intruding into matters of the internal management of the Diocese.” Id. at 579, 580. We held that, where there is a “conflict between the legislative mandate of G. L. c. 151B to eliminate discrimination in the workplace and our constitutional mandate to preserve the separation of church and State, the constitutional directive must prevail.” Id. at 583. See Callahan v. First Congregational Church of Haverhill, 441 Mass. 699, 711-712 (2004).
Earlier this year, the Supreme Court agreed that there is a ministerial exception that bars an employment discrimination suit brought on behalf of a minister.5 Hosanna-Tabor, supra at 706, 710. The Court reasoned:
“The members of a religious group put their faith in the hands of their ministers. Requiring a church to accept or retain an unwanted minister, or punishing a church for failing to do so, intrudes upon more than a mere employment decision. Such action interferes with the internal governance of the church, depriving the church of control over the selection of those who will personify its beliefs. By imposing an unwanted minister, the state infringes the Free Exercise Clause, which protects a religious group’s right to shape its own faith and mission through its appointments. According the state the power to determine which individuals will minister to the faithful also violates the Establishment Clause, which prohibits government involvement in such ecclesiastical decisions.”
Id. at 706. The Court also ruled that an award of money damages against the church for employment discrimination would *478be barred by the ministerial exception, because it “would operate as a penalty on the Church for terminating an unwanted minister, and would be no less prohibited by the First Amendment than an order overturning the termination.” Id. at 709. Resolving a conflict among some of the circuit courts of the United States Court of Appeals, the Court ruled that the ministerial exception “operates as an affirmative defense to an otherwise cognizable claim, not a jurisdictional bar.” Id. at 709-710 n.4. To the extent that we had held under the First Amendment that courts are without subject matter jurisdiction to decide employment disputes involving a minister and a church, the Court’s decision in Hosanna-Tabor overruled that holding. Contrast Hosanna-Tabor, supra, with Callahan v. First Congregational Church of Haverhill, supra at 711-712; Williams v. Episcopal Diocese of Mass., supra at 577, 583. Because the parties and the judge did not have the benefit of the Supreme Court’s decision in Hosanna-Tabor, all assumed that the ministerial exception raised a question of subject matter jurisdiction, not an affirmative defense.
2. Judicial abstention. We consider first whether the judge erred in granting the relief sought before the commission had made a final decision in its adjudicatory proceeding.
To resolve this issue, we briefly explore the adjudicatory process within the commission that leads to a final decision. Once a complaint is filed with the commission, the chair of the commission designates one of the commissioners as an investigating commissioner to investigate the complaint with the assistance of commission staff. 804 Code Mass. Regs. § 1.13(2) (1999). After the completion of the investigation, the investigating commissioner determines whether or not there is probable cause to believe “the respondent committed an unlawful practice.” 804 Code Mass. Regs. § 1.15(7)(a) (1999). Where probable cause is found, after being notified by the parties that discovery is complete, the investigating commissioner issues an order of certification to hold a public hearing, identifying each issue to be considered at a public hearing, which may include subject matter jurisdiction as well as the merits of the discrimination claims. 804 Code Mass. Regs. § 1.20(1), (3)(a) (2004). The public hearing is conducted by a commissioner (other than the investigating commissioner), a *479hearing officer, or the full commission. 804 Code Mass. Regs. § 1.21(1) (1999). After the hearing, the hearing commissioner, hearing officer, or commission issues a written decision with necessary findings of fact and conclusions of law, resolving the issues certified by the investigating commissioner. 804 Code Mass. Regs. § 1.21(18) (1999). Any party aggrieved by the decision of the hearing commissioner or hearing officer may request review by the full commission. 804 Code Mass. Regs. § 1.23(1)(a) (1999). The full commission may affirm the decision, remand it for further proceedings, or set aside or modify the decision. 804 Code Mass. Regs. § 1.23(1)(h) (1999). Among the issues that may be addressed by the full commission are whether the decision is “[i]n violation of constitutional provisions” or “[i]n excess of the statutory authority or jurisdiction of the Commission.” Id.
A complainant, respondent, or other person aggrieved by a final decision of the commission may obtain judicial review in the Superior Court. G. L. c. 151B, § 6. See G. L. c. 30A, § 14. For the purpose of judicial review, “the Decision of the Full Commission . . . shall constitute the Final Order of the Commission.” 804 Code Mass. Regs. § 1.24(1) (1999). Here, the Temple’s motion to dismiss the commission complaint was denied during the investigatory stage of the commission proceedings, before any finding had been made as to probable cause, and before any public hearing had been conducted. Therefore, there was no statutory authority for judicial review of the denial of the motion to dismiss by the investigating commissioner.
Only in extraordinary cases may a court take jurisdiction of a matter that is pending before an administrative agency.6 “Exceptions to the exhaustion requirement have been made when the administrative remedy is inadequate.” Hingham v. Department of Hous. & Community Dev., 451 Mass. 501, 509 (2008). Factors *480we have considered in determining whether to suspend the exhaustion requirement include: whether resort to the administrative remedy would be futile, Ciszewski v. Industrial Acc. Bd., 367 Mass. 135, 141 (1975); whether the case raises important public questions whose resolution will affect people beyond the parties to the case, East Chop Tennis Club v. Massachusetts Comm’n Against Discrimination, 364 Mass. 444, 450 (1973); whether pursuing the administrative remedy will result in irreparable harm to either party, Everett v. Local 1656, Int'l Ass’n of Firefighters, 411 Mass. 361, 368 (1991); and whether there is a question of law “peculiarly within judicial competence,” id.
We address each of these factors. First, the record before the judge did not permit a finding that the exhaustion of administrative remedies would be futile. Only the investigating commissioner had denied the motion to dismiss based on the ministerial exception. The question whether the ministerial exception barred the age discrimination claim here, whether because of subject matter jurisdiction or as a successful affirmative defense, had yet to be decided by a hearing commissioner or a hearing officer, or by the full commission, which would issue the final decision, and there could be no assurance as to how the commission ultimately would rule on this issue. Furthermore, exhaustion of administrative remedies is generally only considered futile “where the power and authority of the agency themselves are in question, and not where the exercise of that agency’s discretion is challenged.” Ciszewski v. Industrial Acc. Bd., supra. Because the ministerial exception would not divest the commission of jurisdiction over Hilsenrath’s complaint, see Hosanna-Tabor, supra at 709-710 n.4, the Temple’s challenge is to the commission’s evaluation of an affirmative defense rather than its authority to adjudicate the complaint.
Second, although the case raises important legal questions about the ministerial exception, the resolution of such claims is fact intensive and a decision in Hilsenrath’s case will, at most, only resolve disputes as to the application of the ministerial exception to teachers in Sunday and after-school religious schools. Compare East Chop Tennis Club v. Massachusetts Comm’n against Discrimination, supra (legal determination whether private club is place of public accommodation subject *481to discrimination laws is fact intensive and “would only resolve the specific dispute between the club and the commission”) with ACE Prop. & Cas. Ins. Co. v. Commissioner of Revenue, 437 Mass. 241, 243 (2002) (resolution of legal question raised would affect “other taxpayers, who are asserting the identical preemption argument in applications for abatement and appeals to the board”).
Third, the judge’s finding that irreparable harm would result if she abstained from taking action until a final decision had been rendered by the commission was premised on the judge’s understanding that the commission’s investigation of the claim, including the requirement that the Temple submit a position statement and answer interrogatories exploring the reasons why Hilsenrath was not rehired, would violate the First Amendment. “The loss of First Amendment freedoms, for even minimal periods of time, unquestionably constitutes irreparable injury.” Elrod v. Burns, 427 U.S. 347, 373 (1976) (plurality opinion). But the commission does not violate the First Amendment merely by investigating the circumstances of a minister’s denial of reemployment in response to a complaint of discrimination. See Ohio Civil Rights Comm’n v. Dayton Christian Schs., Inc., 477 U.S. 619, 628 (1986) (Ohio Civil Rights Comm’n).
In Ohio Civil Rights Comm’n, supra at 623, a religious corporation chose not to renew a contract with one of its teachers when she became pregnant, because its religious doctrine dictated that mothers stay home with young children. After the teacher’s attorney sent a letter to the school threatening litigation based on State and Federal gender discrimination laws, the school immediately suspended and then fired the teacher for violating a religious doctrine of internal dispute resolution. Id. When the teacher filed a complaint with the Ohio Civil Rights Commission, which initiated administrative proceedings against the religious corporation, the corporation filed suit in Federal court to enjoin the agency proceedings. Id. at 624. The United States Supreme Court recognized that, under the so-called Younger doctrine, see Younger v. Harris, 401 U.S. 37 (1971), a Federal court should not enjoin a State administrative proceeding “so long as in the course of those proceedings the federal plaintiff would have a full and fair opportunity to litigate his constitutional *482claim.” Ohio Civil Rights Comm’n, supra at 627. The Court rejected the religious corporation’s contention that its First Amendment rights were violated by the Ohio Civil Rights Commission’s mere exercise of jurisdiction over the case, concluding that “the Commission violates no constitutional rights by merely investigating the circumstances of [the teacher’s] discharge.” Id. at 628. The Court noted that any constitutional claims could be raised in the administrative proceedings, and judicial review was available to consider the constitutional claims after the administrative proceedings had been exhausted. Id. at 629. See Commission on Human Rights & Opportunities v. Archdiocesan Sch. Office, 202 Conn. 601, 608 (1987) (State commission on human rights and opportunities had jurisdiction to require religious school to answer interrogatories in pending discrimination complaint); Congregation Kol Ami v. Chicago Comm’n on Human Relations, 271 Ill. App. 3d 1065, 1070 (1995) (“The process of inquiry into the alleged basis for [religious leader’s] discharge threatens no constitutional rights”); Sacred Heart Sch. Bd. v. Labor & Indus. Review Comm’n, 157 Wis. 2d 638, 642 (Ct. App. 1990) (“Under [Ohio Civil Rights Comm’n], the state agency charged with enforcing the state’s employment laws can investigate discrimination complaints against a religious institution without violating the first amendment”).
The Supreme Court’s opinion in Hosanna-Tabor is consistent with its opinion in Ohio Civil Rights Comm’n. In Hosanna-Tabor, the Court described the First Amendment interests protected by the ministerial exception as “the interest of religious groups in choosing who will preach their beliefs, teach their faith, and carry out their mission.” Hosanna-Tabor, supra at 710. The Court did not suggest that the ministerial exception protects religious groups from investigation of an employment discharge or decision not to employ. In holding that the ministerial exception is an affirmative defense rather than a bar to subject matter jurisdiction, the Court declared that trial courts (and, implicitly, administrative agencies that adjudicate discrimination complaints) have the authority to consider discrimination claims and to decide whether the claim can proceed or is barred by the ministerial exception. Id. at 709-710 n.4. The Court did not suggest that the First Amendment requires *483all discovery to be stayed until the affirmative defense of ministerial exception is fully adjudicated.7
Finally, although this case essentially reduces to a constitutional question, it is not a question that is “peculiarly within judicial competence.” Everett v. Local 1656, Int’l Ass’n of Firefighters, 411 Mass. 361, 368 (1991). In the course of adjudicating discrimination complaints, the commission must decide questions of law, including, at times, questions of constitutional law. See Smith College v. Massachusetts Comm’n Against Discrimination, 376 Mass. 221, 225 n.7 (1978) (“full commission’s review properly involved decisions on questions of law”); 804 Code Mass. Regs. § 1.23(1)(h) (full commission may set aside or modify decision if “[i]n violation of constitutional provisions” or “[bjased on an error of law”). The commission has dismissed cases where it determines that the First Amendment protects the right of the employer to engage in the challenged employment action. See, e.g., Callahan v. First Congregational Church of Haverhill, 441 Mass. 699, 704 (2004).
Therefore, we conclude that the judge should have abstained from deciding whether the ministerial exception barred Hilsenrath’s discrimination claim until the commission entered a final decision. Having so determined, we would generally vacate the judgment, dismiss the Temple’s complaint, and remand the matter to the commission for administrative adjudication of Hilsenrath’s complaint, including adjudication of the affirmative defense of ministerial exception. See East Chop Tennis Club v. Massachusetts Comm’n Against Discrimination, 364 Mass. 444, 453 (1973) (dismissing complaint seeking declaratory relief against commission where respondent failed to exhaust administrative *484remedies and expressing no opinion on merits of legal issue). But we will depart from that usual practice here and determine whether the ministerial exception bars Hilsenrath’s claim because we transferred this case to decide whether the ministerial exception applies to a discrimination claim brought by a religious school teacher, the matter has been fully briefed and argued, and we can resolve the issue based on undisputed facts. See Commonwealth v. Pugh, 462 Mass. 482, 501 (2012); Commonwealth v. Washington W., 457 Mass. 140, 142 n.3 (2010). Contrast East Chop Tennis Club v. Massachusetts Comm’n Against Discrimination, supra at 452 (determination of legal issue depends on disputed facts that commission must find).
3. Application of ministerial exception to teacher at a religious school. Hilsenrath does not dispute that the mission of the religious school is to instill in its students a commitment to lifelong Jewish learning and build on the central values of Jewish heritage, including learning, worship, and acts of loving kindness. To fulfil its mission, the religious school focuses on the study of Jewish holidays, customs, and history; the Torah; ancient and modem Israel; the Hebrew language; and prayer. Hilsenrath’s teaching duties included teaching the Hebrew language, selected prayers, stories from the Torah, and the religious significance of various Jewish holidays.8 The religious school is not a parochial school that provides both daily religious instruction and “instruction in all the studies required by law,” G. L. c. 76, § 1, but is solely a religious school that meets after school and on Sundays.
In Hosanna-Tabor, supra at 699-700, the complainant began work as a “lay teacher” at a parochial school that offered a “ ‘Christ-centered education’ to students in kindergarten through eighth grade.” She later was asked to become a “called teacher” and accepted the call and was designated a commissioned minister.9 Id. at 700. After she became ill, she began the school *485year on disability leave, but in January notified the school principal that she would be able to return to work in February. Id. The school, however, had already contracted with a lay teacher to fill her position for the remainder of the school year. Id. The congregation offered her a “peaceful release” in exchange for her resignation, but she refused to resign and appeared for work when she was medically cleared to return to work. Id. When the principal told her that she would likely be fired, the complainant responded that she had spoken with an attorney and intended to assert her legal rights. Id. The congregation later voted to rescind her call and terminated her employment, citing as grounds her “insubordination and disruptive behavior” on the day she returned to work, and her threat to take legal action. Id. The Equal Employment Opportunity Commission (EEOC) brought suit in the Federal District Court on the complainant’s behalf alleging disability-based employment discrimination and retaliation for the teacher’s threat to file a lawsuit under the Americans with Disabilities Act. Id. at 701.
In concluding that the suit was barred by the ministerial exception, the Supreme Court declared that the question whether the ministerial exception applies does not turn on the reason for the religious group’s employment decision, but rather on whether the employee qualifies as a “minister.” Id. at 709. The Court recognized that the ministerial exception is not limited to the “head of a religious congregation,” but declined to adopt a “rigid formula for deciding when an employee qualifies as a minister.” Id. at 707. Instead, it found that, given all the circumstances of her employment, the complainant was a minister under the exception. Id. at 708. The Court focused on various factors: her title of “minister,” her “significant degree of religious training,” her being “commissioned as a minister” on election by her congregation, her own use of the title of minister, her teaching of religion as part of her job duties, and the religious functions she performed for her church. Id. at 707-708. The *486Court acknowledged that the complainant’s religious duties consumed only forty-five minutes of each work day, with the rest devoted to teaching secular subjects. Id. at 708. The Court rejected the argument that the ministerial exception is limited to those who perform “exclusively religious functions,” concluding that the time spent on religious duties is relevant in determining whether the ministerial exception applies but must not be considered in isolation. Id. at 708, 709 (“The issue ... is not one that can be resolved by a stopwatch”). In one concurring opinion, two Justices emphasized that an employee’s title is not determinative of her status as a minister, and that there is consensus among the courts that a minister is defined by her function, rather than her title. Id. at 713-714 (Alito, J., concurring, with whom Kagan, J., joined).
Here, viewing the evidence in the light most favorable to Hilsenrath, she was not a rabbi, was not called a rabbi, and did not hold herself out as a rabbi. The record is silent as to the extent of her religious training. All that is plain from the record is that she taught religious subjects at a school that functioned solely as a religious school, whose mission was to teach Jewish children about Jewish learning, language, history, traditions, and prayer. In deciding whether the ministerial exception applies to a religious school teacher, the fundamental question is whether it would infringe the free exercise of religion or cause excessive entanglement between the State and a religious group if a court were to order a religious group to hire or retain a religious teacher that the religious group did not want to employ, or to order damages for refusing to do so. See id. at 706. Accord Petrusha v. Gannon Univ., 462 F.3d 294, 303 (3d Cir. 2006), cert. denied, 550 U.S. 903 (2007); Werft v. Desert Southwest Annual Conference of the United Methodist Church, 377 F.3d 1099, 1101 (9th Cir. 2004). We conclude that it would. Where a school’s sole mission is to serve as a religious school, the State should not intrude on a religious group’s decision as to who should (and should not) teach its religion to the children of its members. Therefore, the ministerial exception applies to the school’s employment decision regardless whether a religious teacher is called a minister or holds any title of clergy. See Hosanna-Tabor, supra at 712 (Alito, J., concurring) (employees *487whose “functions are essential to the independence of practically all religious groups” include “those who are entrusted with teaching and conveying the tenets of the faith to the next generation”); EEOC v. Southwestern Baptist Theological Seminary, 651 F.2d 277, 283-284 (5th Cir. 1981), cert. denied, 456 U.S. 905 (1982) (members of faculty at Baptist seminary, where “only religiously oriented courses are taught,” covered by ministerial exception because of their religious function in conveying religious doctrine). We, therefore, hold that the Temple’s decision not to rehire Hilsenrath as a teacher at the religious school is protected by the ministerial exception from a claim of discrimination.10
Conclusion. We affirm the judgment declaring that the Temple’s employment decision not to rehire Hilsenrath was protected by the ministerial exception, and ordering the commission to dismiss the discrimination complaint against the Temple.
So ordered.