—Judgment modified on the law and as modified affirmed without costs and judgment granted in accordance with the following Memorandum: Petitioner, an attorney, commenced this CPLR article 78 proceeding against the Sheriff of the County of Erie and the Office of Court Administration (OCA), seeking a judgment enjoining respondents from restricting free access to the Erie County Courthouse by means of physical and electronic searches of persons entering the courthouse. Petitioner also sought a declaration that those searches are unconstitutional. Supreme Court dismissed the petition and imposed sanctions against petitioner and his law firm on the ground that the proceeding "is completely without merit in law or fact and is a frivolous lawsuit” (Bozer v Higgins, 157 Mise 2d 160, 167).
Supreme Court properly determined that OCA has the authority to implement the searches as security measures to *980protect the courts and those persons using the courts (see, Legal Aid Socy. v Crosson, 784 F Supp 1127). Such limited courthouse searches to screen for weapons are reasonable under the Federal and State Constitutions (see, US Const 4th Amend; NY Const, art I, § 12; People v Rincon, 177 AD2d 125, lv denied 79 NY2d 1053; Legal Aid Socy. v Crosson, supra; see also, McMorris v Alioto, 567 F2d 897; Downing v Kunzig, 454 F2d 1230; Justice v Elrod, 649 F Supp 30, affd 832 F2d 1048; Barrett v Kunzig, 331 F Supp 266, cert denied 409 US 914). Because petitioner sought declaratory relief, however, the court erred in failing to make a declaration in the judgment. Thus, we modify the judgment by granting judgment declaring that those searches are constitutional and not violative of the Judiciary Law.
We further modify by vacating those parts of the judgment imposing sanctions against petitioner and his law firm. In our view, the court abused its discretion in imposing sanctions under section 130-1.1 (a) of the Rules of the Chief Administrator (22 NYCRR). That section provides that financial sanctions may be imposed upon any party or attorney in a civil action or proceeding who engages in frivolous conduct. Conduct is frivolous within the meaning of the rule only if "it is completely without merit in law or fact and cannot be supported by a reasonable argument for an extension, modification or reversal of existing law” (22 NYCRR 130-1.1 [c] [1]).
This proceeding does not approach the type of groundless litigation envisioned by the rule (see, e.g., Matter of Minister of Refm. Prot. Dutch Church v 198 Broadway, 76 NY2d 411, 413 [postappeal motion "plainly untimely”, "utterly without legal support” and evidently undertaken for purpose of delay]; Vicom, Inc. v Silverwood Dev., 188 AD2d 1057, 1058 [sanctions awarded for maintaining action after valid jurisdictional defense had been raised and "repeating groundless and misleading assertions” to oppose defense]). On the contrary, this proceeding raises serious constitutional challenges to respondents’ warrantless searches of persons entering Erie County Hall. The fact that the weight of the authority favors respondents or that those challenges were unlikely to succeed does not render petitioner’s conduct frivolous (see, Nolan & Co. v Daly, 170 AD2d 320; Matter of Schulz v Washington County, 157 AD2d 948, 950). Further, it is significant that there is only one New York court decision upholding the type of courthouse search at issue in this proceeding (see, People v Rincon, supra), and that decision did not address many of the arguments raised by petitioner. Given the paucity of controlling authority *981on the matters raised in the petition, we cannot conclude that this proceeding "is completely without merit in law or fact” (22 NYCRR 130-1.1 [c] [1]).
All concur except Balio and Callahan, JJ., who dissent in part and vote to affirm in the following Memorandum.