The District Attorney of DeSoto Parish and the Public Defender of DeSoto Parish appeal a judgment that declared unconstitutional and annulled the parties' Cooperative Endeavor Agreement ("CEA") to allocate some of the fees from the District Attorney's traffic diversion program to fund the Public Defender's office. The District Attorney has also filed a motion to dismiss the appeal. Southern Poverty Law Center and the American Civil Liberties Union have filed an amici curiae brief defending the judgment. For the reasons expressed, we affirm the judgment and deny the motion to dismiss the appeal.
FACTUAL BACKGROUND
Every judicial district in the State of Louisiana has an indigent defender fund that receives $45.00 for each defendant who is "convicted after a trial, a plea of guilty or nolo contendere, or after forfeiting bond[,]" La. R.S. 15:168 B(1). In early 2017, however, the District Attorney of DeSoto Parish (hereinafter, "the District Attorney") initiated an extensive pretrial diversion program whereby he would decline to prosecute certain nonviolent offenders if they took part in intensive rehabilitation and paid a fee directly to the District Attorney. As a result, court cost disbursements dropped about 80%. The district defender testified that if all traffic tickets were diverted, his revenue would drop 96%.
To avert the funding crisis, the Public Defender and the District Attorney executed the CEA, on March 19, 2018. The main purpose of the CEA was to mirror the scheme of R.S. 15:168 and give the Public Defender $45.00 out of every fee paid to the District Attorney's pretrial diversion program. The CEA also obligated the Public Defender to apply this money to maintain an adequate level of attorney and support staff that is competent, professional and diverse, and to make reasonable efforts to employ African-American attorneys to assist in the defense of DeSoto Parish criminal defendants. Finally, the *710CEA provided that any violation of its terms would constitute immediate grounds for termination, with 30 days' written notice.
When he learned about the CEA, 42nd Judicial District Court Judge Charles Adams issued a sua sponte order in State v. Bayles , the first criminal case on his docket. This order directed the Public Defender and the District Attorney to show cause why the Public Defender's office should not be removed from Bayles , and from "all other cases" involving the Public Defender, "due to a conflict of interests."
The Public Defender and the District Attorney filed separate motions to recuse Judge Adams. After a brief hearing on April 3, Judge Adams rendered an opinion denying both motions, but also stating his views on the merits of the situation. He relied on the court's independent duty to ensure that criminal defendants receive a fair trial that does not contravene the Sixth Amendment, Wheat v. United States , 486 U.S. 153, 108 S.Ct. 1692, 100 L.Ed.2d 140 (1988), specifically the right to conflict-free counsel, Strickland v. Washington , 466 U.S. 668, 104 S.Ct. 2052, 80 L.Ed.2d 674 (1984), and the legislative provision for a public defense system "free of conflicts of interest," R.S. 15:142 B(2). He found that the CEA violates Wheat's prohibition of defense counsel having an ongoing relationship with the opposing party; the Rules of Professional Conduct regarding conflicts of interest, RPC 1.8 (f)(2) ; a State Constitutional provision that the district attorney cannot appear, plead, or in any way defend any criminal prosecution, La. Const. art. V, § 26 (C); and that it potentially violates a State Constitutional prohibition against donating public funds, La. Const. art. VII, § 14 (A). Citing his paramount duty to protect the integrity of the criminal justice system, which he would not "abdicate" because justice was not "for sale," Judge Adams refused to recuse himself.
Apparently Judge Adams had a change of view, because three days later, April 6, the parties returned to court to argue their motions to recuse before ad hoc Judge Jimmie Peters, retired from the Third Circuit.1 Steven Thomas, the district defender, testified that the legislature was considering HB 66, which would disburse diversion money in DeSoto Parish the same as traffic ticket money, and that Judge Adams had testified in support of this bill. Thomas did not think this action created a conflict of interest, but he felt that Judge Adams's ruling on the motions to recuse was, in effect, a ruling on the merits, exposing some bias. Kem Jones, the District Attorney's chief investigator, testified that Judge Adams had also spoken in favor of HB 66 at a La. District Attorneys Association meeting.2 Judge Peters rendered a long opinion delving into the background and the merits of the funding dilemma, but ruling that Judge Adams's advocacy of HB 66 did not rise to the level of bias or personal interest. He further found "absolutely no evidence" of bias, prejudice or personal interest on the part of the other 42nd Judicial District Court judge, Amy Burford McCartney.
The District Attorney then filed a motion to quash Judge Adams's original order and rule to show cause, on grounds that district attorneys have sole charge and control of criminal prosecutions, and are supervised only by the attorney general and not subject to the authority of district *711courts. In fact, the landmark case of State v. Citizen , 2004-1841 (La. 4/1/05), 898 So.2d 325, prohibited district courts from ordering funding for indigent defense. The Public Defender joined in this motion.
Judge McCartney issued, sua sponte, an order creating a case called In re: Cooperative Endeavor Agreement Between the 42nd Judicial District District Attorney's Office and the 42nd Judicial District Public Defender's Office , with the same docket number as State v. Bayles .3
ACTION OF THE DISTRICT COURT
The District Attorney and the Public Defender argued the motion to quash on May 31. Judge McCartney wrote a lengthy opinion, borrowing heavily from Judges Adams's and Peters's prior opinions. She cited the inherent power of courts over all criminal proceedings, La. C. Cr. P. arts. 16, 17 ; the Constitutional guarantee of a fair trial, Const. amend. VI; and the court's duty to prevent conflicts of interest, Wheat v. United States , supra . She found that the CEA "speaks for itself," creating prohibited obligations between the parties; she dismissed the District Attorney's argument as "astounding." Further, she found a violation of RPC 1.8 (f)(2),4 no application of La. Const. art. VII, § 14,5 and an "implication" of RPC 3.3 (a)(1)-(2).6 She concluded that legislative action is needed to address the issue of pretrial diversion, and warned of "increasingly intrusive measures" by the judiciary to address funding issues. She denied the motion to quash. Finally, she declared the CEA "unconstitutional, unlawful, against public policy, and without legal effect."
The District Attorney and the Public Defender have both appealed.
THE PARTIES' POSITIONS
The District Attorney urges the court erred as a matter of law in declaring the CEA to be unconstitutional, unlawful, against public policy, and without legal effect. He advances two arguments.
First, he shows that district attorneys have the constitutional authority to conduct pretrial diversion programs, State v. Franklin , 2013-1489 (La. App. 4 Cir. 6/11/14), 147 So.3d 231, writ denied , 2014-1326 (La. 2/13/15), 159 So.3d 460 ; state agencies have the constitutional authority to use public funds for programs of social welfare and the aid and support of the needy, La. Const. art. VII, § 14 (B); and the state has an obligation to provide indigent defendants with trial counsel, U.S. Const. amend. VI, La. Const. art. VII, § 13. He argues that the CEA specifically recognized that successful performance of the District Attorney's duty to prosecute cases "was contingent upon an effective Public Defender's Office capable of delivering *712competent and professional representation[,]" but that the diversion program may deprive the Public Defender of needed funds. In effect, the CEA merely replaces the $45 per ticket that would have gone to the Public Defender had the matter been prosecuted. There is no "sharing of funds," and there is in fact a legitimate use of public funds for social welfare.7 Further, the state and its political subdivisions are expressly permitted to enter cooperative endeavors for a public purpose, La. Const. art. VII, § 14 (C), and "public purpose" should be broadly construed, City of Shreveport v. Chanse Gas Corp. , 34,958 (La. App. 2 Cir. 8/22/01), 794 So.2d 962, writs denied , 2001-2657, -2660 (La. 1/4/02), 805 So. 2d 209.
Second, the district court lacked jurisdiction to issue a declaratory judgment without a case or controversy before it. Jurisdiction is limited to "civil and criminal matters," La. Const. art. V, § 16, and "an action or proceeding," La. C. C. P. art. 1. No party to the CEA ever filed a pleading requesting that their rights be enforced, determined or otherwise adjudicated; in effect, the District Attorney urges, the court's order was an unauthorized judicial challenge to the CEA. Moreover, no branch of government can exercise power belonging to another, La. Const. art. II, § 2, so the district court has no authority to regulate district attorneys or public defenders, Newman Marchive P'ship v. City of Shreveport , 2007-1890 (La. 4/8/08), 979 So.2d 1262. Although the district court has a duty to ensure that indigent defendants receive effective assistance of counsel, Wheat v. United States , supra , no defendant has alleged a conflict of interest. The Supreme Court has explicitly denied the courts' authority to order funding for indigent defense, State v. Citizen , supra , and the district court's action is analogous to that proscribed in Citizen . Finally, the law expressly allows public defenders to receive "revenue passed through by state agencies" and "revenue from criminal court funds," La. R.S. 15:161 G(1), (2). The CEA served the spirit of the law. The District Attorney concludes that the judgment is invalid and should be summarily reversed.
The Public Defender raises three assignments of error. First, he contends the district court lacked standing to intervene and declare the CEA unconstitutional. The reasoning largely mirrors the District Attorney's second argument, and emphasizes that the court made "no attempt to ascertain" whether the defendant, Bayles, wanted his attorney dismissed prior to this "action."
Second, the court erred in finding the CEA unconstitutional. The Public Defender's funding comes from (1) writing traffic tickets, (2) prosecution of those tickets, and (3) collection, once costs have been imposed, La. R.S. 15:168. The CEA serves the same purpose, except it distributes funds through the diversion program; the Public Defender urges this is a valid transfer, under La. Const. art. VII, § 14 (B).8 In all events, prosecutorial discretion determines the validity of the Public Defender's office, and in no event is the District Attorney representing defendants in the 42nd Judicial District. The Public Defender adopts the District Attorney's position that *713"use of diversion funds is specifically allowed and not a violation of the law."
Third, the court erred in finding the CEA violated the Sixth Amendment by creating a conflict of interest between the Public Defender and his clients. A public defender, by necessity, commingles all the revenue he receives, whether through fine or diversion, but is guided by RPC 5.4 (c) to maintain his professional independence.9 The Public Defender concludes that the court was plainly wrong to find that the CEA conferred on the District Attorney control over the Public Defender's office; he submits that the judgment is invalid and should be summarily reversed.
DISCUSSION
The Court's Authority
The District Attorney's first argument, and the Public Defender's second assignment, challenge the district court's jurisdiction or standing to rule on the legality of the CEA. In general, judges have the power to issue all "needful writs, orders, and process in aid of the jurisdiction of the court." La. Const. art. V, § 2. Courts have the jurisdiction and power over criminal proceedings that are conferred upon them by the Constitution and statutes, except as restricted, enlarged or modified by the Code of Criminal Procedure. La. C. Cr. P. art. 16. A court possesses inherently all of the power necessary for the exercise of its jurisdiction even though not granted expressly by law. La. C.C.P. art. 191 ; see also, La. C. Cr. P. art. 17. Specifically, this includes the power "by the court on its own initiative" to nullify a contract that violates a rule of public order. La. C.C. art. 2030. This is because the law deems any juridical act in derogation of laws enacted for the protection of the public interest to be an absolute nullity. La. C.C. art. 7.
This court has nullified attorney-client contracts that are found to violate the Rules of Professional Conduct. In Skannal v. Jones Odom Davis & Politz , 48,016 (La. App. 2 Cir. 9/25/13), 124 So.3d 500, writ denied , 2013-2887 (La. 2/21/14), 134 So.3d 584, the contract provided for hourly fees throughout the course of litigation to recover the clients' property and mineral rights, but also granted the attorney the unilateral right to elect a one-third contingency fee. This court invalidated the contract on grounds that it effectively eliminated risk of outcome of the matter, in violation of RPC 1.5 (a)(8) and (c). Quoting the landmark case of Leenerts Farms v. Rogers , 421 So.2d 216 (La. 1982), we affirmed that the RPC are "the most exacting of laws established for the public good."
In Soderquist v. Kramer , 595 So.2d 825 (La. App. 2 Cir. 1992), the attorney prepared a settlement agreement that not only resolved the clients' claims against their opponent in the underlying litigation but also waived any claims against the attorney. The clients admitted signing the agreement, but still wanted to pursue malpractice claims against the attorney. This court invalidated the settlement agreement on grounds that it failed to advise the clients in writing that independent representation would be appropriate to determine if the attorney's and clients' interests were in conflict, RPC 1.7 (b)(1), 1.8 (h). This court affirmed that the RPC have the force and effect of substantive law, citing City of Baton Rouge v. Stauffer Chem. Co. , 500 So.2d 397 (La. 1987), and Succession of Wallace , 574 So.2d 348 (La. 1991).
*714On this statutory and jurisprudential landscape, the district court did not err in asserting the standing and jurisdiction to consider whether the CEA violated a law intended for the protection of public interest.
Violation of Constitution and RPC
The Public Defender's third assignment of error, and a portion of the District Attorney's first argument, urge that the district court erred in finding that the CEA violated the constitution by creating a conflict of interest between the Public Defender and his clients. As noted, the Public Defender concedes that he must commingle all the revenue he receives, whether from fines or diversion fees, but contends that allegiance to RPC 5.4 (c) will prevent his office from allowing the "person * * * who pays the lawyer * * * to regulate the lawyer's professional judgment."
Certain overriding principles must be recognized. The Sixth Amendment guarantees the accused the right to have "the Assistance of Counsel for his defence." This has long been construed as guaranteeing conflict-free counsel. Glasser v. United States , 315 U.S. 60, 62 S.Ct. 457, 86 L.Ed. 680 (1942) ; Strickland v. Washington , supra ; State v. Tensley , 41,726 (La. App. 2 Cir. 4/4/07), 955 So.2d 227, writ denied , 2007-1185 (La. 12/7/07), 969 So.2d 629.
Second, no district attorney or assistant district attorney shall appear, plead, "or in any way defend or assist in defending any criminal prosecution or charge." La. Const. art. V, § 26 (C); La. C. Cr. P. art. 65. The CEA obviously sends money directly from the District Attorney's diversion fund to the Public Defender and thus appears to "defend or assist in defending" a criminal prosecution.
Third, a lawyer "shall not accept compensation for representing a client from one other than the client" unless there is "no interference with the lawyer's independent or professional judgment or with the client-lawyer relationship." RPC 1.8 (f). The money sent from the District Attorney's diversion program to the Public Defender to cover indigent defense is compensation from "one other than the client" and thus must adhere to the "no interference" rule. As a matter of law, the CEA does not meet the "no interference" rule: it allows the District Attorney to withdraw funding, after 30 days' notice, for subjective evaluations of competence, professionalism or diversity. These provisions, with the Public Defender's financial reliance on the District Attorney, create leverage over the Public Defender's operation, despite the CEA's recitation that the agreement would in no way modify the contradictory nature of the parties' relationship or the ethical duties each owes his clients.
The district court did not err in finding violations of the constitution and RPC.
Legality of the CEA
The Public Defender's second assignment of error, and a portion of the District Attorney's first argument, urge that the CEA was indeed legal, either as a use of public funds for programs of social welfare for the aid and support of the needy, La. Const. art. VII, § 14 (B), as a cooperative endeavor with a private association, corporation or individual for a public purpose, La. Const. art. VII, § 14 (C), or as a mere replication of the funding scheme established by La. R.S. 15:168 B(1). The appellants contend that not only is the use of diversion funds specifically allowed, but the CEA is an effective means of averting fiscal crisis for indigent defense.
This argument is not without certain appeal. There is always some tension in the effort to balance the state's duty to *715provide indigent defense with the obligation to pay for it. State v. Citizen , supra. The facts that indigent defense must be conflict-free and that the district attorney cannot assist in the defense of any criminal prosecution only make the attempted balance more precarious.
An obligation cannot exist without a lawful cause. La. C.C. art. 1966. The cause of an obligation is unlawful when the enforcement of the obligation would produce a result prohibited by law or against public policy. La. C.C. art. 1968. A contract is absolutely null when it violates a rule of public order, as when the object of a contract is illicit or immoral. La. C.C. art. 2030. This court has found, with the district court, that the CEA violates the Constitutional guarantee of conflict-free counsel, the Constitutional prohibition against the district attorney assisting in the defense of a criminal prosecution, and the RPC's prohibition of interference with the attorney's independent or professional judgment.
It is of no consequence that the means or mechanism chosen to reach the prohibited result would, in other circumstances, be legal. In J-W Operating Co. v. Olsen , 48,756 (La. App. 2 Cir. 1/15/14), 130 So.3d 1017, writ denied , 2014-0313 (La. 4/11/14), 137 So.3d 1217, this court found that certain assignments of interests in mineral leases were absolutely null because the assignor no longer owned the interests. In Alco Collections Inc. v. Poirier , 95-2582 (La. App. 1 Cir. 9/27/96), 680 So.2d 735, writ denied , 96-2628 (La. 12/13/96), 692 So.2d 1067, the First Circuit found that an assignment of debt to a collection agency, on a contingency basis, was absolutely null as an unauthorized practice of law. In Louisiana Claims Adjustment Bureau Inc. v. State Farm Ins. Co. , 38,709 (La. App. 2 Cir. 6/23/04), 877 So.2d 294, writ denied , 2004-1890 (La. 10/29/04), 885 So.2d 595, this court found that an act of mandate from an insurance company to a third-party adjuster was absolutely null as an unauthorized practice of law. In Baker v. Maclay Properties Co. , 94-1529 (La. 1/17/95), 648 So.2d 888, the Supreme Court held that the fee-splitting provision in a contract between an out-of-state real estate broker and an in-state broker was absolutely null because it followed a statute that violated the Privileges and Immunities clause.
The common thread in these cases is that assignments of mineral leases, assignments of uncollected debt, acts of mandate from an insurer to an adjuster, and fee-splitting agreements between real estate brokers are facially valid and, in most situations, perfectly legal. However, if the cause is found to be unlawful, the obligation itself is deemed an absolute nullity. By the same reasoning, the use of funds for social welfare, a cooperative endeavor with a private association for a public purpose, or a private disbursement scheme that mimics a statute, though facially valid, cannot stand if the cause is found to produce a result prohibited by law or against public policy. Such is the case here.
With this conclusion, however, we do not accept the major premise of the amici curiae's brief, that the reliance on fines and court costs to generate profits for government and for private actors is an "illegal or imprudent court practice." No one has yet contended that the disbursement scheme of R.S. 15:168 B(1) is unconstitutional. Moreover, while the legislature did not expressly create diversion programs, it has incorporated them into several statutes and disbursed their proceeds to various programs.10 If the legislature *716considered such programs illegal or imprudent, this would be no way to show it. We simply decline to join the amici's plebiscite decrying Louisiana's approach to funding indigent defense.
Motion to Dismiss the Appeal
Three weeks after oral argument, the District Attorney filed a motion and order to dismiss the appeal as moot, citing his own letter to the Public Defender terminating the CEA "effective immediately." As the District Attorney did not move to supplement the record with the termination letter, the letter appears to violate the CEA's requirement of a 30-day notice of termination, and the other appellant, the Public Defender, has not moved to dismiss the appeal, we deny the motion to dismiss. URCA 2-8.4.
CONCLUSION
For the reasons expressed, we find that the district court had jurisdiction to consider the legality of the CEA; that the CEA violated constitutional provisions guaranteeing conflict-free counsel and prohibiting the district attorney from assisting in criminal defense, as well as a professional rule requiring the public defender to use independent or professional judgment; and that the facial validity of the CEA as a use of public funds for programs of social welfare, as a cooperative endeavor for a public purpose, or as a replication of a funding statute do not rescue the CEA from its constitutional defects. The district court did not err in declaring the CEA unconstitutional, unlawful, against public policy, and without legal effect. The judgment is therefore affirmed. The motion to dismiss the appeal is denied. Appellate costs are not assessed. La. R.S. 13:4521, C.C.P. art. 1920.
JUDGMENT AFFIRMED; MOTION TO DISMISS THE APPEAL DENIED.
The appellate record contains no judgment or order rescinding Judge Adams's initial judgment or appointing Judge Peters to hear the motions ad hoc.
HB 66 was referred to the committee on the judiciary on March 12, 25 days before the hearing with Judge Peters, but it did not advance out of committee.
In all subsequent filings, the parties (and the district court) have inverted the parties' names to list the Public Defender first.
"A lawyer shall not accept compensation for representing a client from one other than the client unless * * * there is no interference with the lawyer's independence or professional judgment or with the client-lawyer relationship."
La. Const. art. VII, § 14 (C), states: "For a public purpose, the state and its political subdivisions or political corporations may engage in cooperative endeavors with each other, with the United States or its agencies, or with any public or private association, corporation, or individual."
"A lawyer shall not knowingly: (1) make a false statement of fact or law to a tribunal or fail to correct a false statement of material fact or law previously made to the tribunal by the lawyer; [or] (2) fail to disclose to the tribunal legal authority in the controlling jurisdiction known to the lawyer to be directly adverse to the position of the client and not disclosed by opposing counsel[.]"
He submits that the attorney general has approved a similar "transfer" from a city court to an indigent defender office, In re John Di Giulio , La. Att. Gen. Op. 11-0243A, 2012 WL 6888776.
La. Const. art. VII, § 14 (B), states in pertinent part: "Nothing in this Section shall prevent (1) the use of public funds for programs of social welfare for the aid and support of the needy[.]"
"A lawyer shall not permit a person who recommends, employs, or pays the lawyer to render legal services for another to direct or regulate the lawyer's professional judgment in rendering such legal services."
For example, La. R.S. 16:17 E permits the district attorney to "assess and collect a reasonable fee from participants in pretrial diversion" to support and maintain victims assistance programs; La. R.S. 15:242 creates a reporting requirement for "persons placed into a pretrial diversion program following an arrest for a violation of R.S. 14:98"; and La. R.S. 15:244, enacted in 2018, creates a special pretrial diversion program for military veterans, "in addition to any existing pretrial diversion program."