
624 F.Supp.2d 1135 (2008)
Aramayis HOVHANNISYAN
v.
UNITED STATES DEPARTMENT OF HOMELAND SECURITY et al.
Case No. CV 08-323AHM (JTLx).
United States District Court, C.D. California.
October 14, 2008.
*1138 S. Mohammad Reza Kazerouni, Law Offices of David L. Ross PA, Beverly Hills, CA, Seyed Abbas Kazerounian, Kazerouni Law Group, Irvine, CA, for Aramayis Hovhannisyan.
Stacey Ilene Young, Department of Justice  Civil Division, Washington, DC, for United States Department of Homeland Security et al.

Proceedings: IN CHAMBERS (No Proceedings Held)
A. HOWARD MATZ, District Judge.

I. INTRODUCTION


  I. INTRODUCTION ......................................... 1138
 II. BACKGROUND ........................................... 1139
III. DISCUSSION ........................................... 1142
     A. The Court Has Subject Matter Jurisdiction ......... 1142
        1. IIRIRA and REAL ID Act ......................... 1143
        2. The Administrative Procedures Act .............. 1146
     B. Plaintiff's Case is Not Moot ...................... 1147
     C. Plaintiff Properly States a Claim ................. 1147
        1. Legal standards ................................ 1147
        2. Discussion ..................................... 1148
 IV. CONCLUSION ........................................... 1152

On May 14, 2008, Defendants United States Department of Homeland Security ("DHS"), United States Citizenship and Immigration Service ("CIS") and Christina Poulos, Director of California Services Center ("CSC"), moved to dismiss Plaintiff Aramayis Hovhannisyan's Complaint seeking relief from CIS's rejection October 14, 2008 of his untimely petition for an H-1B visa and extension of stay. The government contends that CIS's decision is not subject to judicial review, that Plaintiff's claims are moot, and that CIS's decision was lawful.
The Court holds that it has jurisdiction to review this matter because 8 U.S.C. § 1184, the statute governing the admission of nonimmigrants, does not specifically give the agency the discretion to deny or accept untimely petitions. A regulation promulgated under that statute, 8 C.F.R. § 214.1(c)(4), does grant the agency a measure of discretion to accept untimely petitions, but it does not give the agency *1139 discretion to decide the issue in this case: whether or not the untimely filing involved in this case can be attributed to "extraordinary circumstances beyond the control of the applicant or petitioner." The Court also holds that the case is not moot, because the agency may still decide to accept Plaintiff's untimely petition.
As to the merits of the Complaint, the Court holds that the agency is not entitled to dismissal because it erred in failing to state a reasoned basis, supported by substantial evidence, for its determination that "extraordinary circumstances" were not present. The agency also erred in holding that under 8 C.F.R. § 214.1(c)(4) it may not excuse Plaintiff's failure to maintain his status. It appears that if the agency's interpretation of that regulation were correct then the regulation would be rendered null and void. Finally, the agency erred in determining that 8 C.F.R. 214.2(h)(9) prevents it from excusing untimeliness, because that regulation applies only to the initial approval period of an H petition, and Plaintiff's petition was for an extension of a pre-existing visa and grant of stay.
For the foregoing reasons, the Court DENIES Defendants' motion[1] to dismiss. For reasons explained below, the Court REMANDS this matter to the agency for proceedings consistent with this Order.

II. BACKGROUND[2]
Plaintiff is a citizen of Armenia who entered the United States as a nonimmigrant H-1B worker on April 23, 1999. An H-1B visa is an employment-based nonimmigrant visa that allows skilled aliens in certain "specialty occupations" to work in the United States for a limited time, under specified conditions. 8 U.S.C. § 1184. Plaintiff received an extension on his visa from August 20, 2001 through January 1, 2004.
On December 2, 2003, Plaintiff's employer, Business Computing, Inc. ("BCI"), through counsel, an attorney named Eric Avazian,[3] filed a petition ("I-129 form") requesting that CIS grant Plaintiff an extension of stay and issue him a new H-1B visa from January 2, 2004 through January 1, 2007. All applications for "specialty applications" (which would include BCI's I-129 petition on behalf of Plaintiff) require evidence of the filing of a certified Labor Condition Application ("LCA") from the U.S. Department of Labor. 8 U.S.C. § 1182(n)(1); 8 C.F.R. § 214.2(h)(4)(iii)(B) and 20 C.F.R. § 655.700(b). Avazian, however, attached to the I-129 form an uncertified LCA. On February 7, 2004, CSC sent Avazian a Request for Evidence that asked for, among other things, a certified LCA. CAR at 129-32.[4] The request states that "[t]he currently submitted [LCA] is not valid since an authorized DOL Official does not certify it. In addition, the information on the I-129 indicates that the position is part-time while the LCA states otherwise. Provide the correct information with supporting documentation for verification." Id. at 131.
*1140 Avazian submitted the requested evidence, but on June 8, 2004, CIS denied the I-129 petition because BCI had failed to file for a certified LCA prior to filing the I-129 petition, and because the certified LCA that Avazian did send to CSC contained employment dates that were different from the employment dates requested in the I-129 petition. The LCA had been certified by the Department of Labor as valid from April 27, 2004 through January 1, 2007. On July 1, 2004, BCI filed a Motion to Reconsider/Appeal and included a new certified LCA reflecting employment dates from January 1, 2004 through January 1, 2007. The LCA was certified by the Department of Labor as valid from June 23, 2004 through January 1, 2007.
On August 3, 2004, Plaintiff and BCI, again through attorney Avazian, filed a new I-129 petition that requested authorization for Hovhannisyan to live and work in the United States from January 1, 2004 through January 1, 2007.[5] Avazian included a cover letter asking the agency to excuse the late filing of the petition because "[t]he failure to timely file this petition and maintain the status of the beneficiary was beyond the control of the petitioner and the beneficiary since it was the failure of our office to obtain the certified Labor Condition Application prior to the filing of the petition." CAR at 44.
On April 18, 2005, CIS granted Plaintiff a H-1B visa valid from June 23, 2004 to January 1, 2007, and sent the visa to Ottawa, Canada, but denied his petition for an extension of stay.[6] The CIS Notice of Decision states that the extension of stay was denied because
The beneficiary[ is] no longer in a valid nonimmigrant status and therefore must depart the United States. . . . The beneficiary's prior H-1B status . . . was valid from August 20, 2001 to January 1, 2004. The H-1B petition was submitted on August 3, 2004 which was approximately 8 months after the beneficiary's valid status had expired. As such, the beneficiary was in violation of his H-1B status at the time of filing the petition for extension. [¶] The beneficiary has failed to maintain his nonimmigrant status and is therefore ineligible for the requested extension of stay. Accordingly, the request for extension of stay is denied.
CAR at 28-29. As a result, Plaintiff was required to leave the country to obtain the *1141 new visa. (The record does not reflect whether he actually did so.)
On May 18, 2005, Plaintiff, represented by new counsel, filed a "Motion to Reopen/Reconsider," arguing that his failure to maintain lawful nonimmigrant status was due to ineffective assistance of counsel, an "extraordinary circumstance" that should have excused the late filing. On November 28, 2005, CIS denied the motion on the ground that Plaintiff failed to present new facts that were previously unavailable.
On December 9, 2005, Plaintiff filed suit in this Court seeking a declaratory judgment reversing the decision of CIS to deny his request for extension of stay and requiring CIS to approve his request for an H-1B visa from January 2, 2004 through January 1, 2007. Almost one year later, on December 4, 2006, the Court granted in part Plaintiff's motion for summary judgment and remanded the action to CIS. As a threshold matter, the Court concluded "that a determination regarding a petition for a nonimmigrant H-1B visa is not `committed to agency discretion by law,'" and that the Court had jurisdiction to review the agency action. Dec. 4, 2006 Order at 9. The Court then ruled that CIS erred in failing to address or rule on the ineffective assistance of counsel arguments Plaintiff raised in his motion to reconsider. Id. at 12-13. The Court remanded the matter to CSC "to address in good faith and issue a considered decision on [Plaintiff's] motion to reconsider." Id. at 13. The Court denied Plaintiff's request to compel CIS to grant his petition for extension of status.
On February 2, 2007, CIS concluded that Plaintiff's claim of ineffective assistance of counsel did not constitute an "extraordinary circumstance" and therefore did not excuse the untimely filing of the I-129 petition. Feb. 2, 2007 CIS Decision. CIS also held that the Board of Immigration Appeals decision In re Lozada, 19 I. & N. Dec. 637 (BIA 1988), which sets forth procedural guidelines for establishing ineffective assistance of counsel claims, did not apply to the filing of I-129 petitions. CIS further held that even if Lozada did apply, Plaintiff failed to meet its requirements because he did not prove that he submitted a complaint about Avazian to the California State Bar. Finally, CIS also concluded that even if it excused the late filing, the relevant regulations prohibited it from granting an extension of stay because the certified LCA did not cover the full term of Plaintiff's intended employment.[7]
On December 21, 2006, just six weeks prior to CIS's February 2, 2007 decision, Plaintiff apparently filed an I-129 petition to extend his disputed H-1B visa until January 1, 2008.[8] Compl. ¶ 25; Pl. Opp'n at 9, Ex. 2. After CIS's decision, on August 16, 2007, Plaintiff apparently filed an I-485 application to adjust his status to permanent resident. Pl. Opp'n. at 9, Ex. 3.[9]
On January 17, 2008, Plaintiff filed the present suit alleging that CIS's February 2, 2007, decision denying Plaintiff's Motion to Reconsider was unlawful. Plaintiff seeks judicial review under the Administrative Procedure Act ("APA") and declaratory judgment under the Declaratory *1142 Judgment Act. He alleges that CIS improperly found that there can be no ineffective assistance of counsel claims or due process claims in agency administrative matters, and that Defendants disregarded significant facts in making their decision. Compl. ¶ 20. He contends that his H-1B status should have been extended, and that Defendants should have allowed him to "file for a new extension tolling the previous date and approving it." Id. at ¶ 21. Plaintiff also alleges that he is still eligible for an extension of stay as a H-1B nonimmigrant, and that he has not violated his nonimmigrant status. Id. at ¶ 23. Finally, he contends that the CIS decision of February 2, 2007, was wrong as a matter of law. Id. at ¶ 24.
Plaintiff asks this Court to find that the CIS decision was unlawful, to order Defendants to approve Plaintiff's request for extension of H-1B status until January 1, 2007, and to deem Plaintiff's filing for an extension of his H-1B status past January 1, 2007 timely. Id. at ¶ 25. Plaintiff also asks for attorney fees and costs. Id.
On May 14, 2008, Defendants moved to dismiss Plaintiff's complaint for lack of subject matter jurisdiction and for failure to state a claim. On June 18, 2008, Plaintiff filed his opposition papers. Defendants did not file any reply papers.

III. DISCUSSION
In order to promote clarity in the following analysis of an immigration code that "is notoriously complicated and has been described as `second only to the Internal Revenue Code in complexity,'" see Singh v. Gonzales, 499 F.3d 969, 980 (9th Cir.2007), the Court notes at the outset that its decision is based upon the following statutes and regulations.[10] (1) The Court's jurisdiction is governed by the INA, 8 U.S.C. § 1252 (no jurisdiction to review decisions the authority for which is specified by statute to be in the discretion of the agency), and the APA, 5 U.S.C. § 701 (no jurisdiction to review agency decisions committed to agency discretion by law). (2) The agency's decision whether to accept an untimely petition for a nonimmigrant visa and extension of stay is governed primarily by 8 U.S.C. § 1184 (Attorney General may prescribe regulations regarding admission of nonimmigrants and shall prescribe the form and substance of visa petitions), and 8 C.F.R. § 214.1 (agency has discretion to excuse untimely petition when the delay was due to extraordinary circumstances beyond the control of the applicant).

A. The Court Has Subject Matter Jurisdiction
As a threshold matter, the Court must determine whether it has subject matter jurisdiction to hear this case. Defendants argue that the Court lacks jurisdiction under 5 U.S.C. § 701(a)(2) of the APA. The Court holds that it has jurisdiction, both under the APA and under the more stringent jurisdictional provision of the immigration code. The Court has jurisdiction under the latter provision because no immigration statute specifies that the agency has discretionary authority to accept or deny an untimely petition. As to the former provisionwhich the Court applied in its December 4, 2006 orderthe Court has *1143 jurisdiction because the relevant regulation provides a meaningful standard by which this court may review the agency's decision. The Court also holds that this case is not moot, because the agency may still decide to grant Plaintiff's petitions for extensions of stay and for adjustment of status.

1. IIRIRA and REAL ID Act

Although Defendants challenge this Court's jurisdiction under the APA, the Court's review is governed by IIRIRA's[11] jurisdiction-limiting provision, codified at 8 U.S.C. § 1252, which supersedes the parallel provision in the APA.[12]ANA Int'l Inc. v. Way, 393 F.3d 886, 890 (9th Cir.2004). That provision, entitled "Judicial review of orders of removal," provides that:
Notwithstanding any other provision of law . . . no court shall have jurisdiction to review(i) any judgment regarding the granting of relief under section 1182(h), 1182(i), 1229b, 1229c, or 1255 of this [Title 8. Aliens and Nationality], or (ii) any other decision or action of the Attorney General or the Secretary of Homeland Security the authority for which is specified under this [Subchapter II. Immigration] to be in the discretion of the Attorney General or the Secretary of Homeland Security, other than the granting of relief under section 1158(a) of this title.
8 U.S.C. § 1252(a)(2)(B) (emphasis added). The Court concludes that under the precedent of this Circuit and several others, 8 U.S.C. § 1252 does not strip the Court of jurisdiction to review the decision challenged by Plaintiff: whether CIS erred in deciding to reject his untimely filing of a petition for extension of stay.
The analysis of any statute begins with the text of the statute itself. It is clear that subsection (i) of the above provision does not apply, because the authority to issue nonimmigrant visas and extensions of stay does not come from any of the sections enumerated there.[13]
As to subsection (ii), the Ninth Circuit has emphasized that "[t]he plain language of [8 U.S.C. § 1252(a)(2)(B)(ii)] precludes judicial review only for actions `specified under this subchapter to be in the discretion of the Attorney General . . . .'" Sandoval-Luna v. Mukasey, 526 F.3d 1243, 1246 (9th Cir.2008) (quoting 8 U.S.C. § 1252(a)(2)(B)(ii)). In this case, the agency's authority to excuse the untimely filing of a petition for extension of stay is not "specified under" the relevant subchapter (which encompasses 8 U.S.C. §§ 1151-1381) to be in its discretion. Rather, the authority is specified exclusively in an agency regulation, 8 C.F.R. § 214.1(c)(4).[14]*1144 This regulation was promulgated under two statutory provisions that authorize the Attorney General to prescribe regulations governing the conditions under which nonimmigrants may be admitted. These statutory provisions do not specifically give him discretion to reject or accept untimely filings. See 8 U.S.C. § 1184(a)(1) ("The admission to the United States of any alien as a nonimmigrant shall be for such time and under such conditions as the Attorney General may by regulations prescribe. . . ."); 8 U.S.C. § 1184(c)(1) ("The question of importing any alien as a nonimmigrant. . . in any specific case . . . shall be determined by the Attorney General . . . upon petition of the importing employer. . . . The petition shall be in such form and contain such information as the Attorney General shall prescribe.").
Apart from the plain text of the relevant statutory provisions, 8 U.S.C. §§ 1184(a)(1) and (c)(1), the Court's analysis is supported by the fact that Congress did take pains to specify by statute that the agency has discretion to make other kinds of decisions related to the admission of nonimmigrants. The most striking distinction is found in 8 U.S.C. § 1184(q)(3), a provision giving the Attorney General the power to make regulations concerning the nonimmigrant status of the spouses and children of permanent residents. Unlike the provision at issue in this case, that provision not only gives the Attorney General the power to issue such regulations, it also specifies explicitly that his authority is discretionary. It states:
The status of an alien . . . may be adjusted by the attorney general, in the discretion of the attorney general and under such regulations as the attorney general may prescribe, to that of a nonimmigrant under section 1101(a)(15)(V) of this title . . . .
8 U.S.C. § 1184(q)(3) (emphasis added). Several other provisions related to the admission of nonimmigrants also specifically give the Attorney General discretion. See 8 U.S.C. § 1184(c)(6)(F) ("The Attorney General shall give such weight to advisory opinions provided under this section as the Attorney General determines, in his sole discretion, to be appropriate."); 8 U.S.C. § 1184(d)(1) ("the Secretary of Homeland Security in his discretion may waive the requirement that the parties have previously met in person."); 8 U.S.C. § 1184(d)(2)(C)(iii) ("The determination of what evidence is credible and the weight to be given that evidence shall be within the sole discretion of the Secretary.").
The statutory provisions at issue in this case parallel the provisions at issue in Sandoval-Luna v. Mukasey, a recent Ninth Circuit case holding that the courts have jurisdiction over claims that an immigration judge abused his discretion by denying a motion for a continuance. 526 F.3d at 1246-47. The Ninth Circuit adopted the reasoning of Alsamhouri v. Gonzales, a First Circuit case addressing *1145 the same issue. 484 F.3d 117, 122 (1st Cir.2007). In Alsamhouri, the court examined the statutory provision giving immigration judges authority to grant continuances. Like the statutory provisions giving the agency authority to admit nonimmigrants, that provision is written in general terms. It states that "[a]n immigration judge shall conduct proceedings for deciding the inadmissibility or deportability of an alien." 8 U.S.C. § 1229(a)(1). And, as with the authority to excuse or reject nonimmigrants' untimely petitions, the authority to grant a continuance is specified only in the regulations "promulgated by the Attorney General to implement statutory provisions that broadly authorize immigration judges to conduct removal proceedings, but do not specifically authorize them to grant or deny continuances. . . ." Alsamhouri, 484 F.3d at 122. The First Circuit noted that "[i]ndeed, the relevant statutory provisions do not mention continuances, let alone indicate that the granting or denial of continuances by the IJ is `in the discretion of the Attorney General.'" Id. This observation also applies to the statutes giving the agency authority to accept or reject untimely nonimmigrant petitions. See also Zafar v. Attorney General, 461 F.3d 1357, 1360 (11th Cir.2006); Khan v. Attorney General, 448 F.3d 226, 232-33 (3d Cir.2006); Ahmed v. Gonzales, 447 F.3d 433, 437 (5th Cir.2006); Sanusi v. Gonzales, 445 F.3d 193, 198 (2d Cir. 2006) (per curiam).
Sandoval-Luna is not the first case in which the Ninth Circuit has held that courts have jurisdiction to review determinations that are made under a statute that does not specify that the agency has discretion. In Medina-Morales v. Ashcroft, the Ninth Circuit held that it had jurisdiction to review an immigration judge's discretionary denial of a motion to reopen. 371 F.3d 520 (9th Cir.2004). The Ninth Circuit began by noting that "the jurisdictional bar in § 1252(a)(2)(B)(ii) applies only to acts over which a statute gives the Attorney General pure discretion unguided by legal standards or statutory guidelines." Id. at 528. The court held that "[d]enials of a motion to reopen are not acts over which a statute gives the Attorney General such pure discretion," because the governing statute "far from authorizing pure, unguided discretion on the part of the Attorney General, specifies guidelines for aliens and makes no mention of discretion." Id. Just as with the agency's authority to deny nonimmigrants' untimely petitions, "[i]mmigration judges do have broad discretion to deny motions to reopen. . . . [H]owever, this discretion . . . `derives solely from regulations promulgated by the Attorney General,' rather than from a statute." Id. The Ninth Circuit also noted that because the relevant statute "neither grants nor limits the Attorney General's discretion to deny motions to reopen, IIRIRA can perhaps be said to have left such authority to the Attorney General by default. But default authority does not constitute the specification required by § 1252(a)(2) (B)(ii)." Id.
In sum, because the relevant statutes in this case do not specifically grant Defendants the discretionary authority to deny or accept untimely filings of petitions for extension of stay, this Court holds that it has jurisdiction to review whether the agency's decision was well founded legally. This conclusion is further supported by the "strong presumption in favor of judicial review of administrative action," INS v. St. Cyr, 533 U.S. 289, 298, 121 S.Ct. 2271, 150 L.Ed.2d 347 (2001), and by "the general rule to resolve any ambiguities in a jurisdiction-stripping statute in favor of the narrower interpretation." ANA Int'l, Inc., 393 F.3d at 894.


*1146 2. The Administrative Procedures Act

Even if Defendants were correct and it were the APA's jurisdictional provision, not the IIRIRA provision, that applied, this Court would still have jurisdiction to review this matter simply because the APA provision is less strict than the IIRIRA provision. "[A]ny determination that passes the more stringent IIRIRA test, remaining subject to judicial review, also passes the lower bar of the APA test." ANA Int'l, Inc., 393 F.3d at 891.
In its December 4, 2006 order, this Court set forth additional reasons why it has jurisdiction under the APA. In short, that Order relied on the principle that an agency's action is reviewable under the APA if "regulations . . . provide a `meaningful standard' by which this court may review its exercise of discretion." Spencer Enters., Inc. v. United States, 345 F.3d 683, 688 (9th Cir.2003) (quoting Socop-Gonzalez v. INS, 208 F.3d 838, 844 (9th Cir.2000) (internal quotation marks omitted)). The Court concluded that in this case the regulations do provide such standards.
Defendants now argue that the decision to accept or reject an untimely petition is discretionary even under the regulation. They are incorrect. Although the regulation states that an untimely filing "may be excused in the discretion of the Service," the regulation also provides that the agency may exercise that discretion only if the applicant or petitioner satisfies a set of enumerated conditions. One of those conditionsthe one at issue hereis that the "delay was due to extraordinary circumstances beyond the control of the applicant or petitioner . . . ." 8 C.F.R. § 214.1(c) (emphasis added). In this case CIS found that Plaintiff did not satisfy this condition, and thus it never reached the point where it could exercise the discretion bestowed by the regulation. See Feb. 2, 2007 CIS Decision at 3 ("The fact that Mr. Avazian mistakenly failed to submit a . . . certified LCA at the time of filing does not rise to the level of `extraordinary.'")
Although Plaintiff had the burden to show that he met the conditions, the agency had the duty to give a rational explanation, supported by substantial evidence, for its conclusion that extraordinary circumstances were not present. Cf. Tongatapu Woodcraft Hawaii, Ltd. v. Feldman, 736 F.2d 1305, 1308-09 (9th Cir. 1984) (alien bears burden of proving eligibility for visa, and agency has burden of producing substantial evidence supporting its determination). "[D]eterminations that require application of law to factual determinations are nondiscretionary." Hernandez v. Ashcroft, 345 F.3d 824, 833 (9th Cir. 2003). "[A]ny purely legal, non-discretionary question that was a decision factor remains reviewable, whether or not the decision as a whole is discretionary." ANA Int'l, Inc., 393 F.3d at 895. Defendants do not dispute that the regulation's pre-conditions to excusing untimely filings provide meaningful standards by which this court may review its decision. See Dhital v. Mukasey, 532 F.3d 1044 (9th Cir.2008) (reviewing the BIA's interpretation of "extraordinary circumstances" in the asylum context); Husyev v. Mukasey, 528 F.3d 1172 (9th Cir.2008) (same).
Accordingly, this Court finds that it has jurisdiction under the APA to decide whether the agency met its burden of giving a rational explanation, supported by substantial evidence, for its conclusion that extraordinary circumstances did not excuse Plaintiff's untimely filing of his petition.

B. Plaintiff's Case is Not Moot
"[A] case is moot when the issues presented are no longer `live' or the parties lack a legally cognizable interest in the outcome." City of Erie v. Pap's A.M., *1147 529 U.S. 277, 287, 120 S.Ct. 1382, 146 L.Ed.2d 265 (2000) (citation omitted). A key inquiry is whether it is "impossible for the court to grant any effectual relief whatever to [the] prevailing party." Id. (internal quotations omitted). "In that case, any opinion as to the legality of the challenged action would be advisory." Id.
Defendants argue that this case is moot because Plaintiff is no longer threatened with an actual injury that this Court can redress, given that the date to which he sought to extend his H-1B status, January 1, 2007, has already passed. Defendants cite 8 C.F.R. § 214.1(c)(4) in support of their argument that "even if he were to obtain approval of the original petition, he would not be able to file for an additional extension because he will have been out of status since January 2, 2007." As discussed, that regulation gives CIS the discretion to excuse an applicant's failure to maintain status if it determines that his failure to file an extension of stay was due to "extraordinary circumstances beyond the control of the applicant or petitioner." In its February 2, 2007 decision, CIS stated that Plaintiff failed to make such a showing.
This lawsuit is fundamentally about whether that holding was in error. Plaintiff alleges that Defendants acted unlawfully in denying Plaintiff's Motion to Reopen/Reconsider despite his ineffective assistance of counsel claim and in disregarding "the fact that the only reason the extension was requested until [January 1, 2007] was because Plaintiff had been waiting for approval of his H-1B extension and could NOT request a new extension until the Defendants approved his previous extension." Compl. ¶¶ 20-21. The relief that Plaintiff seeks is an order granting approval of his I-129 petition for extension of H-1B status until January 1, 2007 and deeming Plaintiff's December 21, 2006 petition[15] for an additional extension of H-1B status past that date timely. Although the Court cannot order the CIS to deem the August 3, 2004, petition timely, the CIS could, on its own accord, excuse a late filing under 8 C.F.R. § 214.1(c)(4) due to the extraordinary circumstances of these proceedings. Thus, this action is not moot. Plaintiff has a legally cognizable interest in the outcome of this lawsuit because he needs, and may obtain, an extension of status to remain in the country lawfully.

C. Plaintiff Properly States a Claim

1. Legal standards

On a motion to dismiss pursuant to Rule 12(b)(6) of the Federal Rules of Civil Procedure for failure to state a claim, the allegations of the complaint must be accepted as true and are to be construed in the light most favorable to the nonmoving party. Wyler Summit P'ship v. Turner Broad. Sys., Inc., 135 F.3d 658, 661 (9th Cir.1998). A Rule 12(b)(6) motion tests the legal sufficiency of the claims asserted in the complaint. Thus, if the complaint states a claim under any legal theory, even if the plaintiff erroneously relies on a different *1148 legal theory, the complaint should not be dismissed. Haddock v. Bd. of Dental Examiners, 777 F.2d 462, 464 (9th Cir.1985).
Federal Rule of Civil Procedure 8(a)(2) requires
"only a short and plain statement of the claim showing that the pleader is entitled to relief," in order to "give the defendant fair notice of what the . . . claim is and the grounds upon which it rests[.]" . . . While a complaint attacked by a Rule 12(b)(6) motion to dismiss does not need detailed factual allegations. . ., a plaintiff's obligation to provide the "grounds" of his "entitle[ment] to relief" requires more than labels and conclusions, and a formulaic recitation of the elements of a cause of action will not do . . . . "Factual allegations must be enough to raise a right to relief above the speculative level."
Bell Atlantic Corp. v. Twombly, 550 U.S. 544, 127 S.Ct. 1955, 1964-65, 167 L.Ed.2d 929 (2007) (internal citations omitted).
"Generally, a district court may not consider any material beyond the pleadings in ruling on a Rule 12(b)(6) motion. . . . However, material which is properly submitted as part of the complaint may be considered" on a motion to dismiss. Hal Roach Studios, Inc. v. Richard Feiner & Co., 896 F.2d 1542, 1555 n. 19 (9th Cir.1990) (citations omitted). Similarly, "documents whose contents are alleged in a complaint and whose authenticity no party questions, but which are not physically attached to the pleading, may be considered in ruling on a Rule 12(b)(6) motion to dismiss" without converting the motion to dismiss into a motion for summary judgment. Branch v. Tunnell, 14 F.3d 449, 454 (9th Cir.1994). If the documents are not physically attached to the complaint, they may be considered if their "authenticity. . . is not contested" and "the plaintiff's complaint necessarily relies" on them. Parrino v. FHP, Inc., 146 F.3d 699, 705-06 (9th Cir.1998). Furthermore, under Fed.R.Evid. 201, a court may take judicial notice of "matters of public record." Mack v. South Bay Beer Distrib., 798 F.2d 1279, 1282 (9th Cir.1986). "The district court will not accept as true pleading allegations that are contradicted by facts that can be judicially noticed or by other allegations or exhibits attached to or incorporated in the pleading." 5C Wright & Miller, Fed. Prac. and Pro. § 1363 (3d ed. 2004).

2. Discussion

As discussed above, CIS has discretion to accept an untimely petition for extension of stay if "it is demonstrated at the time of filing that: (i) The delay was due to extraordinary circumstances beyond the control of the applicant or petitioner, and the [CIS] finds the delay commensurate with the circumstances . . . ." 8 C.F.R. § 214.1(c)(4). The primary issue in this case is whether the agency erred by finding that Plaintiff's delay in filing a complete I-129 petition was not due to "extraordinary circumstances beyond the control of the applicant . . . ." As explained below, the Court holds that the agency did err because its determination that the mistakes of Plaintiff's counsel did not constitute extraordinary circumstances was not supported by rational explanation or substantial evidence. In addition, the agency's conclusion that under 8 C.F.R. § 214.1(c)(4) it may not excuse Plaintiff's failure to maintain his status appears to nullify that regulation's exception for untimeliness. Finally, the Court holds that 8 C.F.R. 214.2(h)(9) did not prevent the agency from excusing untimeliness because that regulation applies only to the initial approval period of an H petition, and Plaintiff's petition was for an extension of a pre-existing visa and grant of stay.
*1149 As this Court stated in its 2006 order, a reviewing court will not set aside agency action denying an alien's visa petition unless the action is found to be "arbitrary, capricious, an abuse of discretion, or otherwise not in accordance with the law." 5 U.S.C. § 706(2)(A); Mt. St. Helens Mining & Recovery Ltd. Partnership v. United States, 384 F.3d 721, 727 (9th Cir.2004); Spencer Enters., Inc., 345 F.3d at 693 (9th Cir.2003). Courts have found that the immigration service "abuses its discretion by making decisions without rational explanation, and departing inexplicably from established policies . . ." Rodriguez-Rivera v. INS, 993 F.2d 169, 170 (8th Cir.1993) (per curiam) (citing Garcia-Lopez v. INS, 923 F.2d 72, 74 (7th Cir.1991)); see also Navarro-Aispura v. INS, 53 F.3d 233, 235-36 (9th Cir.1995) (declining to defer to agency's application of its regulation where it was not supported by a rational explanation); Hajiani-Niroumand v. INS, 26 F.3d 832, 835 (8th Cir.1994); Camarena v. Meissner, 78 F.Supp.2d 1044, 1047 (N.D.Cal.1999) (decision of the INS may be set aside if it was irrational or did not offer a reasoned explanation for its decision). Courts give great deference to an agency's construction of its own regulations, but an agency abuses its discretion when it fails to comply with those regulations. See Andriasian v. INS, 180 F.3d 1033, 1046 (9th Cir.1999) ("It is the failure to abide by its own regulations that renders the BIA's decision `contrary to law'. . . and therefore an abuse of discretion." (internal citation omitted)). An abuse of discretion will also be found if the decision is unsupported by substantial evidence. Young v. Reno, 114 F.3d 879, 883 (9th Cir.1997). "Substantial evidence" means "more than a mere scintilla. It means such relevant evidence as a reasonable mind might accept as adequate to support a conclusion." Ibarra-Flores v. Gonzales, 439 F.3d 614, 618 (9th Cir.2006).
Defendants first argue that because there is no constitutional right to counsel in immigration proceedings, "it is hard to imagine that an alleged `mistake' made by [Plaintiff's] counsel in an administrative petition . . . would constitute `extraordinary circumstances' for untimely filing purposes." Mot. at 12. First, the Court notes that the February 2, 2007 CIS decision made no mention of this reason for rejecting Plaintiff's petition. We may not accept counsel's post hoc rationalizations for agency action. Altamirano v. Gonzales, 427 F.3d 586, 595 (9th Cir.2005) (citing Burlington Truck Lines, Inc. v. United States, 371 U.S. 156, 168-69, 83 S.Ct. 239, 9 L.Ed.2d 207 (1962)). "It is well established that an agency's action must be upheld, if at all, on the basis articulated by the agency itself." Oregon Natural Desert Ass'n v. Bureau of Land Mgmt., 531 F.3d 1114, 1141 (9th Cir.2008) (quoting Motor Vehicle Mfrs. Ass'n v. State Farm Mut. Auto. Ins. Co., 463 U.S. 29, 50, 103 S.Ct. 2856, 77 L.Ed.2d 443 (1983)).
Moreover, the Ninth Circuit has noted "that although alien petitioners do not have a Sixth Amendment right to counsel, precedent in this circuit permits [ineffective assistance of counsel] claims as a due process challenge under the Fifth Amendment." Singh v. Gonzales, 499 F.3d 969, 972 n. 2 (9th Cir.2007). In his complaint, Plaintiff characterizes his claim as a due process challenge, alleging that "Defendants based their decision on their belief that there can be no claim of ineffective assistance of counsel in Agency administrative matters, effectively averring that there can be no due process claims in administrative adjudications." Compl. ¶ 20. Thus, because there is a constitutionally-based due process right to counsel, Defendants' contention that ineffective assistance of counsel cannot constitute *1150 "extraordinary circumstances" cannot rest on the claim that there is no such right.[16]
Next, Plaintiff has cited the decision of the BIA in In re Lozada, 19 I. & N. Dec. 637 (BIA 1988) as supporting his position. In Lozada, "the BIA held that a petitioner alleging ineffective assistance of counsel must: (1) provide an affidavit describing in detail the agreement with counsel; (2) inform counsel of the allegations and afford counsel an opportunity to respond; and (3) report whether a complaint of ethical or legal violations has been filed, and if not, why." Melkonian v. Ashcroft, 320 F.3d 1061, 1071-72 (9th Cir.2003) (citing Lozada, supra). Without citing any authority, Defendants contend that Lozada does not apply to this case because Lozada involved removal proceedings whereas this case involves administrative proceedings in connection with an I-129 petition. Although courts most often have applied Lozada in cases where the allegedly ineffective assistance occurred in connection with removal proceedings, Defendants do not cite a decision limiting Lozada to removal proceedings and the Court is not aware of any such decision.
Defendants next argue that if Lozada does apply, Plaintiff failed to meet its requirements because he did not prove that he submitted a complaint about his attorney to the California State Bar. However, Plaintiff has attached to his opposition to the motion to dismiss a California State Bar Complaint Form about Avazian dated May 9, 2005. Pl. Opp'n. at Ex. 4. Plaintiff also attached a letter from the State Bar of California acknowledging receipt of Plaintiff's complaint. Id. Defendants did not submit a reply to Plaintiff's opposition, and thus did not challenge this evidence. The Court has therefore considered it. Even if the evidence were insufficient, the Ninth Circuit has "been flexible in applying the Lozada requirements" and "seldom reject[s] ineffective assistance of counsel claims solely on the basis of Lozada deficiencies." Lo v. Ashcroft, 341 F.3d 934, 938 n. 4 (9th Cir.2003). Furthermore, "the Lozada requirements are not `sacrosanct'. . . . Where, for example, the `facts are plain on the face of the administrative record,' the requirements of Lozada `are not dispositive.'" Melkonian, 320 F.3d at 1072. Here, there is record evidence that Plaintiff's former attorney has admitted responsibility for the failure to file a certified LCA. See CAR at 44.
In any event, it is doubtful whether Lozada, and Defendants' discussion of it, is dispositive in this case. Lozada simply sets forth the procedural steps a petitioner must take in order to file a claim of ineffective assistance of counsel. The primary issue in this case, however, is whether the mistake made by Plaintiff's counsel, the fact and nature of which are not disputed, constituted an "extraordinary circumstance." CIS has given no reason why Plaintiff's claim must take the form of a Lozada ineffective assistance of counsel claim in order for the agency to determine that Mr. Avazian's mistake was extraordinary.
Defendants next argue that CIS "properly found that Hovhannisyan did not establish `extraordinary circumstances beyond' his control justifying his failure to timely file his I-129 petition, as required by 8 C.F.R. 214(c)(4)(i)." Mot. at 13. As noted above, an agency "abuses its discretion by making decisions without rational explanation" and "if the decision is unsupported by substantial evidence." Young, 114 F.3d at 883; Rodriguez-Rivera, 993 F.2d at 169.
*1151 The CIS decision does not provide a rational explanation or substantial evidence for its conclusion that the attorney's failure was not "extraordinary." CIS merely stated that
The evidence clearly indicates that the beneficiary and attorney Eric Avazian have been working together since the filing of the petitioner's first "successful" petition in October 2000, since, as the beneficiary claims ... he had hired Mr. Avazian.... So, the beneficiary has not established what extraordinary circumstances took place that were beyond his or the petitioner's control. From what the beneficiary has stated it appears that both attorney and beneficiary were aware of what is required for the submission of a successful petition. The I-129 petition instructions on page 4 clearly state that an LCA is required. The fact that Mr. Avazian mistakenly failed to submit a Department of Labor (DOL) certified LCA at the time of filing does not rise to the level of "extraordinary."
Feb. 2, 2007 CIS Decision at 3.
This statement does not give a rational explanation for why the attorney's previous experience with filing an I-129 petition lends support to the conclusion that not just the attorney but the "beneficiary [was] aware of what is required for the submission of a successful petition." Nor does it cite any evidence that Hovhannisyan was aware of what was required, beyond the fact that the attorney had once before filed a successful petition. Indeed, if Plaintiff's former attorney did file a valid LCA with Plaintiff's I-129 petition in 2000, that would make it all the more extraordinary that he failed to file a certified LCA in the second petition.
Moreover, there is no way to know from the CIS decision whether the agency applied its regulations consistently or arbitrarily because it cites no precedential applications of the "extraordinary circumstances" condition. This deficiency is particularly troubling in light of judicial authority holding that ineffective assistance constituted "exceptional circumstances" in other immigration contexts. See, e.g., Granados-Oseguera v. Mukasey, 546 F.3d 1011, 1016 (9th Cir.2008) (noting that prior to IIRIRA amendment eliminating "exceptional circumstances" as an excuse for overstaying a voluntary departure period, a failure to timely voluntary depart due to counsel's ineffectiveness had been treated as an "exceptional circumstance"). It is also striking that the agency's own regulations identify ineffective assistance of counsel as a type of "extraordinary circumstance" that may excuse the failure to file an asylum application within one year of entering the United States. 8 C.F.R. § 208.4(a)(5)(iii). There may or may not be reasons for applying the "extraordinary circumstance" condition differently in different contexts, but the agency nevertheless has a duty to explain its interpretation of that term.
Defendants next argue that even if Hovhannisyan's late filing were excused under 8 C.F.R. § 214.1(c)(4), the agency's regulations would still prohibit it from approving his petition. The portion of the CIS decision addressing this issue appears to rely on an inapposite regulation, and its reasoning appears to render 8 C.F.R. § 214.1(c)(4) null and void. After quoting a string of statutes and regulations, with no intervening analysis, the decision states:
8 C.F.R. 214.2(h)(9) discusses the limitations placed on the validity period of an H-1B petition by the labor condition application as follows:
(iii) Validity. The initial approval period of an H petition shall conform to the limits prescribed as follows:
(A)(1) H-1B petition in a specialty occupation. An approved petition classified under section *1152 101(a)(15)(H)(i)(b) of the Act for an alien in a specialty occupation shall be valid for a period of up to three years but may not exceed the validity period of the labor condition application.
As shown, in the preceding paragraph an H-1B petition approval notice shall only be valid for a period not the exceed the validity period of the LCA.
In this case, the beneficiary's previous H-1B approval notice was for the validity period of August 20, 2001, to January 01, 2004. Also, the present petition was filed on August 03, 2004, with an LCA certifying a validity period from June 23, 2004, to January 01, 2007.
Feb. 2, 2007 CIS Decision at 5 (emphasis added). The regulation cited here, 8 C.F.R. 214.2(h)(9), appears to be inapposite because it states clearly that it applies to the "initial approval period of an H petition ...." Plaintiff's petition, however, was not for an initial approval; it was for an extension of a pre-existing petition. The agency's reliance on this regulation is therefore puzzling. See Mot. at 14.
The CIS decision continues,
Even if the late filing of the petition is excused, USCIS is bound by the validity period listed on the LCA. Therefore, the beneficiary did not maintain his H-1B status for the period not covered by the LCA (which would include the time from the expiration of the validity period of the petitioner's previous approval notice until the starting date of employment on the latest LCA). In this case, the beneficiary failed to maintain his H-1B status from January 02, 2004, until June 23, 2004. This is a period of over six months. Under 8 C.F.R. 214(c)(4) only the failure to file the petition before his status expired may be excused. The failure to maintain his status from January 1, 2004, until June 23, 2004, cannot be excused.

Feb. 2, 2007 CIS Decision at 5 (emphasis added). It is not clear whether the agency is here applying the inapposite regulation, 8 C.F.R. § 214.2(h)(9), to 8 C.F.R. § 214(c)(4), or whether it is interpreting § 214(c)(4) on its own terms. In either case, under the CIS decision's reasoning the agency may not excuse a late filing if a beneficiary fails to maintain his status, but it may excuse a late filing if a beneficiary files the petition after his status has expired. This rule may well nullify the effect of § 214(c)(4)'s exception for late filings. Hasn't a beneficiary who files the petition after his status has expired also failed to maintain his status? Is there any circumstance in which a beneficiary's status expires before a petition is filed, but the beneficiary does not fail to maintain his previously accorded status? If there is no such possible circumstance, CIS's interpretation of the regulation effectively renders it void, since its position is that an untimely filing may be excused only if the beneficiary maintains his previously accorded status. There may well be such circumstances, but the CIS decision gives no indication that there are, or that its reasoning would ever permit the agency to excuse untimeliness under § 214(c)(4). Again, CIS failed to cite any evidence of agency practice that would allow for a determination that the ruling was not an abuse of discretion. As it stands, the agency's interpretation of its regulations appears to be inconsistent with the text of 8 C.F.R. § 214(c)(4).
In sum, the agency failed to provide a reasoned explanation or substantial evidence for its decision, and therefore Plaintiff has not failed to state a claim that the CIS decision was improper.

IV. CONCLUSION
For the foregoing reasons, the Court DENIES Defendants' motion to dismiss.[17]*1153 Ordinarily, further proceedings would follow a denial of a motion to dismiss. But given the history of this case it is clear what would happen: the government would move for summary judgment and the Court would remand the case to the agency to have a record that would enable it to rule on the merits. To spare the parties the expenditure of time and money to get to that predictable result, the Court sua sponte REMANDS the case to the United States Citizenship and Immigration Service ("CIS"), a division of the United States Department of Homeland Security ("DHS"), with directions for it to proceed in a manner consistent with this Order.
NOTES
[1]  Dkt. No. 8.
[2]  This factual background derives largely from the Order that this Court issued on December 4, 2006 in a previously-filed, related case between the same parties (CV 05-8623). The Order granted in part Plaintiff's motion for summary judgment and remanded the action to the CSC, which is a part of the DHS and its subsidiary agency, the CIS. The case currently before this Court concerns CIS's decision on remand. There have been no filings or proceedings in the 2005 action since the Court's December 4, 2006 order. The clerk is instructed to close the 2005 case.
[3]  Avazian appeared on behalf of both BCI and Plaintiff.
[4]  "CAR" refers to the Certified Administrative Record that the CSC filed under seal with this court on May 22, 2006.
[5]  The CAR contains a copy of the August 3, 2004 I-129 form, but it is not clear which LCA accompanied that petition. The I-129 form has a field labeled "Dates of Intended Employment," and the dates "01/01/2004" and "01/01/2007" are typed below. The first date, however, was crossed out and the text "06/23/04 per LCA" was written in. CAR at 34. The Court cannot determine whether Plaintiff or the agency made this notation, but in this Court's December 4, 2006 order it assumed that "[t]he certified LCA that Avazian submitted with the [August 3, 2004] petition reflected employment dates from June 23, 2004 through January 1, 2007." Dec. 4, 2006 Order at 3. The most recent order from CIS, dated February 2, 2007, stated that "the present petition was filed on August 3, 2004, with an LCA certifying a validity period from June 23, 2004 to January 01, 2007." Feb. 2, 2007 CIS Decision at 5.
[6]  A visa does not permit entry to the United States; it only permits the visa holder to travel to the port-of-entry for a specific purpose. The authorized length of a nonimmigrant's stay in the United States is referred to as the "duration of status" and is determined by the Department of Homeland Security. See generally U.S. Dep't of State, Duration & Extension of Stay in the U.S., http://travel. state.gov/visa/temp/info/info_1298.html (last accessed Sept. 24, 2008). It appears that CIS's April 18, 2005 decision permitted Plaintiff to obtain a new H1-B visa in Ottawa, but did not extend his "duration of status." Without an extension of status, Plaintiff presumably would not be guaranteed re-entry upon picking up the visa.
[7]  CIS also found that Plaintiff's counsel failed to submit a Notice of Entry of Appearance as Attorney or Representative, and therefore "counsel's response may not be considered. As such, all representations will be considered, but the decision will be furnished only to the beneficiary." Feb. 2, 2007 CIS Decision.
[8]  As discussed above, on April 18, 2005, CIS had issued an H-1B visa that was valid until January 1, 2007. CAR at 2.
[9]  Defendants did not file a reply to Plaintiff's opposition, and thus did not challenge the Court's consideration of the evidence of the I-129 and I-485 applications that Plaintiff attached to his opposition.
[10]  Further complicating matters, although responsibility to adjudicate petitions was transferred in 2002 "from the now defunct INS (an agency within the Department of Justice and under the Attorney General's supervision) to the CIS (an agency within DHS), many statutes and regulations pertaining to immigration law have yet to be amended to reflect this transfer of authority . . . ." Lazli v. U.S. Citizenship & Immigration Servs., No. 05-CV-1680-BR, 2007 WL 496351 (D.Or. Feb. 12, 2007), slip op. at *9 n. 8. For the sake of simplicity, this Order generally refers to "the agency" when discussing the decisionmaker responsible for rejecting Plaintiff's petition.
[11]  "IIRIRA" stands for "Illegal Immigration Reform and Immigrant Responsibility Act."
[12]  Some courts had held that § 1252 is limited to orders of removal, but Congressional action overruled this interpretation when the REAL ID Act of 2005 took effect on May 11, 2005. Pub.L. No. 109-13, 119 Stat. 231. Section 101(f) of the Act clarified IIRIRA by providing that a discretionary decision of the Attorney General is shielded from judicial review "regardless of whether the judgment, decision, or action is made in removal proceedings." This amendment applies as of the date of the enactment of the REAL ID Act "to all cases pending before any court on or after such date." § 101(h)(4).
[13]  Section 1255 of Title 8 does address "Adjustment of status of nonimmigrant to that of person admitted for permanent residence," but Plaintiff's adjustment of status to that of a permanent resident is not at issue in this matter because the agency has not yet processed his I-485 application.
[14]  8 C.F.R. § 214.1(c)(4) provides, "An extension of stay may not be approved for an applicant who failed to maintain the previously accorded status or where such status expired before the application or petition was filed, except that failure to file before the period of previously authorized status expired may be excused in the discretion of the Service and without separate application, with any extension granted from the date the previously authorized stay expired, where it is demonstrated at the time of filing that:

(i) The delay was due to extraordinary circumstances beyond the control of the applicant or petitioner, and the Service finds the delay commensurate with the circumstances;
(ii) The alien has not otherwise violated his or her nonimmigrant status;
(iii) The alien remains a bona fide nonimmigrant; and
(iv) The alien is not the subject of deportation proceedings . . . ."
8 C.F.R. § 214.1(c)(4) (emphasis added). Defendants cite only this regulation to support their assertion that "USCIS may authorize an extension of status at its sole discretion." Mot. at 10.
[15]  The complaint does not specify the date Plaintiff filed the I-129 application he wants approved, but the only extant application and the only one at issue in this suit is the one he filed on August 3, 2004. Nor does the complaint state the date Plaintiff filed the extension he wants approved, but Plaintiff explains in his response to the motion to dismiss that on December 21, 2006, he filed an I-129 petition to extend his H-1B visa until January 1, 2008. Pl. Opp'n at 9, Ex. 2. He asserts that this petition would have kept him in status (i.e., lawfully here) until January 1, 2008 if his "original petition" (presumably the August 3, 2004 petition) had been granted. Id. Plaintiff also asserts that on August 16, 2007 he filed an I-485 application to adjust his status to permanent resident. Id. at Ex. 3. He contends that this application keeps him in status until it is processed. Id. at 9.
[16]  Even if there were no such constitutional right, Defendants have given no reason why it is rational for the absence of such a right to influence the agency's determination of the presence or absence of "extraordinary circumstances" in cases such as this one.
[17]  Dkt. No. 8.
