Plaintiff-appellant Chiplin Enterprises, Inc. (“Chiplin”) built, operates, and collects rents from a 24-unit apartment complex in Lebanon, New Hampshire. The building permit for the project was granted only after five years of negotiations with local authorities and a trip through the New Hampshire courts. Once it had the permit in hand, Chiplin brought the present suit in the United States District Court for the District of New Hampshire. It sought $2,000,000 in damages for “violation of plaintiff’s civil and constitutional rights” by the city of Lebanon, its building inspector, and the members of its planning board. After a brief hearing, the district court concluded that it lacked jurisdiction and granted the defendants’ motion to dismiss.1 We affirm.
I.
The background of this suit is not disputed. Appellant first sought a building permit from the city’s building inspector in the fall of 1976. It was informed that the project required the approval of the Lebanon Planning Board, pursuant to section 504 of the city zoning ordinance, which called for “site plan review” by the board of any project that could have a “substantial impact” on the area. The board granted preliminary approval, but denied the permit after a public hearing, noting possibly severe traffic problems. On January 31, 1977, Chiplin submitted a modified propos*1526al; this too was rejected after a public hearing. Chiplin then sought review in the New Hampshire Superior Court. See N.H. Rev.Stat.Ann. § 36:34. A hearing was held in May 1978, and on April 19, 1979, the court affirmed the board’s denial of a permit.2
Chiplin appealed to the state Supreme Court. It argued, as it had below, that section 504 exceeded the scope of the state enabling legislation on which it was based, and that the board therefore had no power to review its plans. In an opinion issued February 14,1980, the New Hampshire Supreme Court agreed. It held that because the enabling legislation authorized planning board review of nonresidential uses only, it could not support review of Chiplin’s project. The enabling legislation had by that time been amended to grant planning boards explicit authority to review site plans for “multi-family dwelling units.” The court found, however, that the amendment came too late to help the city in this case. It remanded the case to the Superior Court.
Meanwhile, Lebanon had repealed section 504 and adopted a new zoning ordinance and master plan. Under the plan, Chiplin’s proposed complex was not permissible. The Superior Court ordered an interlocutory appeal concerning the effect of the new master plan, which the Supreme Court denied in August of 1980. The case was then reheard by the Superior Court, which found, in January 1981, that the project fell within a grandfather clause in the new master plan, and that the amendment to the enabling legislation did not retroactively salvage planning board review. A permit was finally issued on November 12, 1981; work began the following spring; and the apartments were completed in October of 1982.
II.
Chiplin filéd this section 1983 action in April 1982 seeking damages for the five-year delay between its initial application and the grant of the permit. The alleged constitutional violation is not the lengthy delay as such, however. Rather, under appellant’s theory, it is the denial itself that is actionable. The ensuing delay only established the extent of damage; it did not cause it. Had the delay been one year rather than five, or even, in theory, one day, the claim would be no weaker although damages would be much less.
Chiplin asserts that as it had met all legal requirements for the permit, the town had no valid reason to reject the application. It then aims in the general direction of the federal Constitution with buckshot, stating that this improper denial of a permit “unlawfully restricted and interfered with plaintiff’s use and enjoyment of its property,” “interfered with plaintiff’s prospective economic gain,” denied it the equal protection of the law, and took its property without due processor just compensation. As described in its brief to us, the “gravamen of plaintiff’s complaint is that the individuals named as defendants denied the plaintiff due process by maliciously denying it a building permit for invalid and illegal reasons and in bad faith.”
III.
Even taking the factual allegations of the complaint to be true, we do not think Chiplin has made out a federal claim.3 The Supreme Court has frequently noted the two essential elements of a cause of action under 42 U.S.C. § 1983: 1) that the conduct complained of was carried out under color of state law, and 2) that this conduct de*1527prived the plaintiff of rights, privileges, or immunities secured by the Constitution or laws of the United States. E.g., Parratt v. Taylor, 451 U.S. 527, 535, 101 S.Ct. 1908, 1912, 68 L.Ed.2d 420 (1981). The first requirement is met here. It is more difficult, however, to identify a constitutional right of which Chiplin has been deprived.
Chiplin’s claim is essentially identical to that rejected in Creative Environments, Inc. v. Estabrook, 680 F.2d 822 (1st Cir.1981), cert. denied,- U.S. -, 103 S.Ct. 345, 74 L.Ed.2d 385 (1982). The plaintiff in that case, “CEI,” was a real estate developer whose plan for a housing development had been rejected by the local planning board. Like Chiplin, CEI alleged that the plan had been improperly rejected, this “arbitrary misapplication of state law resulting ... in denying them their ‘right’ to conduct a legitimate business and make a profit.” Id. at 831. We were willing to “assume that CEI ... could have established at trial that the town engaged in adversarial and even arbitrary tactics with regard to the CEI plan.” Id. at 829. Nonetheless, we held that CEI did not allege a constitutional violation. “[Pjroperty is not denied without due process simply because a local planning board rejects a proposed development for erroneous reasons or makes demands which arguably exceed its authority under the relevant state statutes.” Id. at 832 n. 9. We saw nothing in that controversy to “distinguish it sufficiently from the usual land developer’s claim under state law to warrant recognition of a federal constitutional question,” id. at 833, and we see nothing here.
Chiplin asserts that what it sees as the appellees’ flouting of state law — their refusal to issue a permit “even though all reasonable requirements had been met”— provides a basis for a section 1983 action. Yet it is axiomatic that not every violation of a state statute amounts to an infringement of constitutional rights. Paul v. Davis, 424 U.S. 693, 700, 96 S.Ct. 1155,1160, 47 L.Ed.2d 405 (1976). The courts have rejected similar attempts to create a constitutional question out of a state law violation in the land use area. E.g., Sucesion Suarez v. Gelabert, 701 F.2d 231, 233 (1st Cir.1983); Creative Environments, 680 F.2d at 833; Couf v. DeBlaker, 652 F.2d 585, 590 n. 11 (5th Cir.1981), cert. denied, 455 U.S. 921,102 S.Ct. 1278, 71 L.Ed.2d 462 (1982); Crocker v. Hakes, 616 F.2d 237, 239 n. 2 (5th Cir. 1980). The claim that denial of the permit was improperly motivated, unsupported by an allegation of the deprivation of a specific constitutional right, simply raises a matter of local concern, properly and fully reviewable in the state courts.4
To be sure, additional factors might give rise to genuine constitutional issues in cases of this sort. In Packish v. McMurtrie, 697 F.2d 23 (1st Cir.1983), a firefighter alleged that he had been denied reimbursement for medical expenses in retaliation for his published criticisms of town officials.5 While rejecting any due process claim, we acknowledged that plaintiff would have a viable first amendment claim if he could show the denial was, in fact, retaliatory for exercise of constitutionally protected freedoms. We affirmed the grant of summary judgment for the defendants on the ground that plaintiff had not made out any such improper basis. Similarly, in Manego v. Cape Cod Five Cents Savings Bank, 692 F.2d 174 (1st Cir.1982), we considered plaintiff’s claim that he had been denied an entertainment license because he was black. There too we accepted that plaintiff had at least *1528stated a valid claim, although not one which he was able to prove.
Here, however, the only path into the Constitution is via due process, and plaintiff’s claim is not even that he was denied procedural due process.6 No other constitutional right is alleged to have been denied. While Chiplin does refer to the equal protection clause, this only relabels the claim: it has been deprived of the equal protection of the laws only to the extent that it has been deprived of its property without due process. In contrast, the plaintiffs in Packish and Manego at least alleged, though they could not support, the “different situation” we identified in Creative Environments, where we pointed out that “[djifferent considerations may also be present where recognized fundamental constitutional rights are abridged.” 680 F.2d at 832 n. 9. Such considerations are absent here. See also id. at 833 (A “conventional planning dispute — at least when not tainted with fundamental procedural irregularity, racial animus, or the like — ... does not implicate the Constitution.”); Sucesion Suarez v. Gelabert, 701 F.2d 231 (1st Cir.1983) (affirming dismissal for failure to state a claim of section 1983 action brought by landowner who had been denied sand extraction permit and alleged that state agency exceeded its authority).
We recently reemphasized that “even the outright violation of state law by local officials” in denying a license does not automatically raise a federal claim. Roy v. City of Augusta, 712 F.2d 1517, 1523 (1st Cir. 1983). Although we found that the plaintiff in that case, who had been denied a renewal of his pool hall license, had stated a claim, it was not because the license had been denied for improper reasons. Rather plaintiff presented facts — including statements critical of defendants by the state Supreme Court — which indicated that defendants had flouted a command of that court to issue a license to the plaintiff, and that because of special circumstances the state courts were now unavailable to correct the wrong. No such situation is present here. Chiplin prevailed in the state courts, and as a result now has its permit, and its building.7
In short, we see no meaningful distinction between the present claim and that rejected in Creative Environments. A mere bad faith refusal to follow state law in such local administrative matters simply does not amount to a deprivation of due process where the state courts are available to correct the error. Absent the allegation of a constitutional violation, no claim has been stated under section 1983.
IV.
This case was dismissed not for failure to state a claim but on jurisdictional grounds. The order, drafted by counsel for the defendants, stated that the court was “without proper subject matter jurisdiction” because “plaintiff asserts no substantial federal question.” See Fed.R.Civ.P. 12(b)(1). See generally Hagans v. Lavine, 415 U.S. 528, 536-43, 94 S.Ct. 1372,1378-82, 39 L.Ed.2d 577 (1974). We hesitate to say that on the face of the complaint the district court lacked jurisdiction. Chiplin’s right to recover depends on construction of the Constitution and laws of the United States, and its claim is not so patently frivolous as not to involve a federal controversy. See Oneida Indian Nation v. County of Oneida, 414 U.S. 661, 666-67, 94 S.Ct. 772, *1529776-77, 39 L.Ed.2d 73 (1974); Wheeldin v. Wheeler, 373 U.S. 647, 649, 83 S.Ct. 1441, 1443, 10 L.Ed.2d 605 (1963); Bell v. Hood, 327 U.S. 678, 682-85, 66 S.Ct. 773, 776-77, 90 L.Ed. 939 (1946). However, the fact remains that Chiplin has failed to state a claim on which relief can be granted. Dismissal was proper, but it should have been pursuant to defendants’ motion under Rule 12(b)(6) rather than 12(b)(1). In these circumstances there is no obstacle to our affirming on the ground that plaintiff failed to state a claim on which relief can be granted. Carr v. Learner, 547 F.2d 135,137 (1st Cir.1976) (affirming, on the ground of failure to state a claim, dismissal under 12(b)(1)); see also Susquehanna Valley Alliance v. Three Mile Island Nuclear Reactor, 619 F.2d 231, 239 (3d Cir.1980) (dismissal affirmed because remand “for the entry of a dismissal under Fed.R.Civ.P. 12(b)(6), rather than under Fed.R.Civ.P. 12(b)(1), would be a futile exercise”), cert. denied, 449 U.S. 1096,101 S.Ct. 893, 66 L.Ed.2d 824 (1981); Sacks v. Reynolds Securities, Inc., 593 F.2d 1234, 1239 (D.C.Cir.1978). We accordingly do so.
Affirmed.