
86 B.R. 203 (1988)
In re Kelly AERNI, Debtor.
Kelly AERNI, Plaintiff,
v.
COLUMBUS FEDERAL SAVINGS and Higher Education Assistance Foundation, Defendants.
Bankruptcy No. BK87-40272-BKC-JL, Adv. No. 88-4006.
United States Bankruptcy Court, District of Nebraska.
May 26, 1988.
*204 Kevin Ruser, Scott Bayne, UNL Civil Clinical Law Program, Lincoln, Neb., for plaintiff Kelly Aerni.
Terrance L. Michaels, Omaha, Neb., for defendants Higher Educ. Assistance Foundation.

MEMORANDUM OPINION AND ORDER
JOHN C. MINAHAN, Jr., Bankruptcy Judge.
In this Chapter 7 proceeding, the plaintiff, debtor, filed a Complaint to Determine the Dischargeability of Student Loans. The debt arises from loans made to the plaintiff by Columbus Federal Savings. Higher Education Assistance Foundation ("Foundation") guaranteed repayment of the loans and is now the holder of the debtor's notes. The Foundation was joined as an additional party defendant. The Foundation filed a counterclaim asking the court to find non-dischargeable the debt arising from the execution of the promissory notes for the student loans. The Foundation also seeks a judgment against the plaintiff for the amount of the loans. The matter presently before the court concerns a motion filed by the plaintiff to dismiss the counterclaim for lack of jurisdiction. The plaintiff has filed a brief in support of her motion.
The court finds that an independent jurisdictional basis exists under 28 U.S.C. § 1334 for this court to adjudicate the counterclaim. Even if an independent jurisdictional basis did not exist, the counterclaim would be within the court's ancillary jurisdiction since the counterclaim arises from the same transaction as the plaintiff's jurisdictional conferring claim.

FACTS
On February 5, 1988, the plaintiff filed a Complaint to Determine the Dischargeability of Student Loans. The student loans are listed as unsecured debts on the plaintiff's schedule of debts. The complaint alleges that the plaintiff would be subjected to undue hardship if the student loans are held non-dischargeable under 11 U.S.C. § 523(a)(8). In the complaint, the plaintiff requests that the court enter an order declaring the student loans dischargeable. The Foundation filed a separate Answer and Counterclaim. The relief sought in the counterclaim is to have the debt declared non-dischargeable and to award the Foundation a judgment against the plaintiff for the amount of the notes plus interest.
The plaintiff argues that this court does not have the jurisdictional power to adjudicate the counterclaim which involves issues of whether the notes were properly executed, whether the plaintiff is in default, and whether the Foundation can recover the amount owed to it by the plaintiff. The plaintiff argues that the counterclaim is permissive rather than compulsory. Thus, alleges the plaintiff, the counterclaim must have an independent jurisdictional basis to be tried in federal court. The plaintiff *205 argues that the amount in controversy does not exceed $10,000. The plaintiff also argues that the claim is a state contract action, thus, a federal question is not raised. The plaintiff alleges that since neither the diversity of citizenship nor the federal question jurisdiction is raised, there is no independent jurisdictional basis for the suit to be tried in federal court.

DISCUSSION
The court has subject matter jurisdiction over the plaintiff's complaint to determine dischargeability under 28 U.S.C. § 1334. Since the determination of dischargeability under the complaint is a core proceeding under 28 U.S.C. § 157(b)(2)(I), a bankruptcy judge may enter appropriate orders and judgments.
Rule 13 of the Federal Rules of Civil Procedure applies to adversary proceedings in bankruptcy court in most instances. Bankruptcy Rule 7013. The present situation is one of those instances where Fed.R. Civ.P. 13 does apply. Rule 13 states that a counterclaim is either compulsory or permissive. A counterclaim is permissive, thus, may be brought, if the claim does not arise out of the same transaction or occurrence that is the subject matter of the opposing party's claim. Permissive counterclaims must have grounds for jurisdiction independent of that on which the main action is based. In re Yagow, 53 B.R. 737, 739 (Bkrtcy.D.N.D.1985). See also By-Products Corp. v. Armen-Berry Co., 668 F.2d 956, 960-961 (7th Cir.1982). A counterclaim is compulsory, thus, must be brought, if the claim arises out of the transaction or occurrence that is the subject matter of the opposing party's claim. There are exceptions which do not apply here. See Fed.R.Civ.P. 13(a).
Compulsory counterclaims typically involve common questions of law and fact with the primary jurisdictional conferring claim of the plaintiff. The interests of judicial economy and the principles of res judicata and collateral estoppel require that compulsory counterclaims be adjudicated in the same proceeding as the plaintiff's jurisdictional conferring claim. Thus, Fed.R. Civ.P. 13, procedurally, requires that a compulsory counterclaim be asserted. Federal courts have long held that despite the limited character of their jurisdiction, they take jurisdiction over a case in its entirety. The courts have held that as an incident to their subject matter jurisdiction over the plaintiff's claim, they may adjudicate compulsory counterclaims since they fall within the ancillary jurisdiction of the court. See e.g., Baker v. Gold Seal Liquors, Inc., 417 U.S. 467, 469 n. 1, 94 S.Ct. 2504, 2506, n. 1, 41 L.Ed.2d 243 (1974); Minahan, Pendent and Ancillary Jurisdiction of United States Federal District Courts, 10 Creighton L.Rev. 279 (1977).
A bankruptcy court has subject matter jurisdiction to adjudicate a counterclaim in an adversary proceeding if there is an independent jurisdictional basis for the counterclaim, or if the counterclaim is compulsory and the court has ancillary power under 28 U.S.C. § 1334.
First, this court holds that it has the subject matter jurisdiction to decide the defendant's counterclaim because an independent jurisdictional basis for the counterclaim exists under 28 U.S.C. § 1334. The counterclaim is asserted by a creditor against the debtor and seeks a determination of liability. The defendant's claim is that the student loans are non-dischargeable, therefore, the plaintiff is liable on the debt, and a judgment for the amount of the debt should be entered accordingly. Such a claim by a creditor against the debtor is within the district court's jurisdiction under 28 U.S.C. § 1334. A bankruptcy judge may adjudicate the claim under 28 U.S.C. §§ 157(b)(1) & (2) which state:
(b)(1) Bankruptcy judges may hear and determine all cases under title 11 and all core proceedings arising under title 11, or arising in a case under title 11, referred under subsection (a) of this section, and may enter appropriate orders and judgments, subject to review under section 158 of this title.
(2) Core proceedings include, but are not limited to 
. . . . .

*206 (B) allowance or disallowance of claims against the estate . . . ;
. . . . .
(I) determinations as to the dischargeability of particular debts;
. . . . .
The plaintiff argues that the defendant's counterclaim is not a core proceeding "arising under title 11, or arising in a case under title 11." The counterclaim is a core proceeding, however, since it involves issues of dischargeability and the allowance of the claim asserted by the defendant. Since the counterclaim is a core proceeding, it is properly adjudicated in bankruptcy court under 28 U.S.C. § 157.
Second, even if an independent jurisdictional basis for the counterclaim does not exist, the bankruptcy court has ancillary jurisdictional power to adjudicate a compulsory counterclaim.
In determining whether or not a counterclaim is compulsory, the key issue is whether the counterclaim arose out of the same transaction or occurrence upon which the original complaint is based. The court finds that the counterclaim did arise out of the same transaction or occurrence.
The purpose of Fed.R.Civ.P. 13(a) dealing with compulsory counterclaims is to require that transactionally related claims be asserted in a single lawsuit. Rule 13 prevents an unnecessary multiplicity of litigation, and promotes the prompt resolution of all disputes involving common matters. See In re Smith, 52 B.R. 792, 795 (Bkrtcy, E.D.Cal.1985). The underlying controversy involved in this lawsuit is whether the plaintiff is obligated to pay the student loans. The plaintiff claims that she is not obligated to pay, and the defendant claims that the plaintiff is obligated to pay. Both claims arise from the same, identical transactions  the execution of the promissory notes.
The Eighth Circuit Court of Appeals has held that in determining whether claims arise from the same transaction or occurrence, the court must consider the following:
(1) Are the issues of fact and law raised by the claim and counterclaim largely the same?
(2) Would res judicata bar a subsequent suit on defendant's claim absent the compulsory counterclaim rule?
(3) Will substantially the same evidence support or refute plaintiff's claim as well as defendant's counterclaim?
(4) Is there any logical relation between the claim and the counterclaim?
Cochrane v. Iowa Beef Processors, Inc., 596 F.2d 254, 264 (8th Cir.1979), U.S. cert. denied, 442 U.S. 921, 99 S.Ct. 2848, 61 L.Ed.2d 290 (1979). See also In re Belcher, 13 B.R. 421, 423 (Bkrtcy.W.D.Mo.1981).
Applying these four factors in the present case, the court finds, first, that the issues of fact and law raised by the claim and counterclaim are largely the same. The claims involve a common core of operative facts. Both claims involve the consideration of the circumstances surrounding the student loans. The circumstances to be considered center around the granting of the loan and the effect on the debtor if she were required to pay them. The claims also involve the same applicable law. Both claims involve liability on the loans and the plaintiff's obligation to pay them. The court cannot decide whether or not a debt is dischargeable unless it first considers the underlying transaction giving rise to the debt, and, thus, the validity and amount of the debt. Cf. In re Shapiro, 22 B.R. 685, 687 (Bkrtcy.E.D.Pa.1982) ("resolution of the dischargeability issue . . . would necessitate that the bankruptcy judge consider the underlying transaction"). The plaintiff argues that the facts and law in support of each claim are different because the plaintiff wants to use bankruptcy law to determine if the loans are dischargeable, and the defendant wants the bankruptcy court to consider execution of the notes, default, and liability. The subject matter jurisdiction of federal courts over claims related to bankruptcy cases is not allocated by considerations of choice of law. The fact that state law may govern issues related to the enforceability of the underlying loan and promissory note is not material to the question of whether a federal court has *207 the power to adjudicate the claim. The point of focus under the first factor of Cochrane is whether the issues of law and fact raised by the claim and counterclaim are largely the same. The fact that the applicable law may be state law or federal law is immaterial.
The second factor to consider in determining whether the counterclaim arises from the same transaction or occurrence is the effect of res judicata. A complaint seeking declaratory relief as to the dischargeability of a student loan is founded on the necessary premise that such a loan exists and is enforceable. A declaratory judgment on dischargeability should have res judicata effect as to all claims between the parties that relate to the enforceability of the student loan.
Third, substantially the same evidence will support or refute the plaintiff's claim as well as the defendant's counterclaim. The existence of the student loans is necessary to either a determination that the debt is dischargeable or that the debt is non-dischargeable.
Fourth, the claim and the counterclaim are logically related. Both claims arise from the same loan transaction. Logically, both claims should be considered simultaneously because both claims require litigation on the plaintiff's ultimate obligation to pay the student loans. The counterclaim of the defendant is, therefore, a compulsory counterclaim under Fed.R.Civ.P. 13.
The plaintiff relies on In re Yagow, supra, for her argument that the defendant's counterclaim is only a permissive counterclaim. However, Yagow is distinguishable. In Yagow, the Production Credit Association (PCA) filed a complaint alleging that a pre-petition debt owed to it by the debtor is non-dischargeable under §§ 523(a)(2), (a)(4), and (a)(6). The Debtors filed a counterclaim asserting that the PCA ceased lending the debtors money under a financing commitment, thus, breached their contract. The court held that the counterclaim was permissive rather than compulsory. The court said that "the failure to continue lending can hardly be said to arise out of the same transaction or occurrence which led to PCA making the very loans which they now seek to have declared non-dischargeable." Id. at 739. The claim and counterclaim in Yagow arose from loan transactions between the plaintiff and defendant, but the questions of fact and law on the claims were not largely the same. The claim and counterclaim presently before the court are much more closely related because a necessary element of the claim and counterclaim is that an enforceable student loan exists.
The final question to consider is whether the doctrine of ancillary jurisdiction applies to adversary proceedings in bankruptcy. The advisory committee note to Bankruptcy Rule 7014, which deals with third-party practice, notes that the bankruptcy rules do not purport to deal with questions of subject matter jurisdiction. The note indicates that the scope of the jurisdictional grant under 28 U.S.C. § 1334 and whether or not the doctrines of pendant and ancillary jurisdiction apply to adversary proceedings in bankruptcy are issues which should be left for the courts to decide.
This court holds that district courts, and the bankruptcy court as a unit of the district court under 28 U.S.C. § 157, have ancillary jurisdiction under 28 U.S.C. § 1334. See In re Tidewater Group, Inc., 63 B.R. 670 (Bkrtcy N.D.Ga.1986). See also In re Wood, 52 B.R. 513 (Bkrtcy D.Ala.1985). The absence of ancillary jurisdiction would make it virtually impossible for bankruptcy courts to implement a modern system of procedural rules. Absent ancillary jurisdiction, the court could not adjudicate compulsory counterclaims, cross-claims, third party claims, and other claims permitted to be asserted under the Federal Rules of Civil Procedure, unless each claim independently qualified for adjudication in federal court. The interest of judicial economy and principles of res judicata and collateral estoppel mandate that the bankruptcy and district courts have ancillary and pendent jurisdiction under 28 U.S.C. § 1334.


*208 CONCLUSION
The court finds that an independent jurisdictional basis exists to adjudicate the counterclaim. The dischargeability issue is a core matter which may be decided by the bankruptcy court. Alternatively, the court finds that the claim is a compulsory counterclaim and may be heard under the court's ancillary jurisdictional power. The plaintiff's claims and the defendant's counterclaim involve but one issue  the plaintiff's obligation to pay the student loans. The claims arise out of the same transaction or occurrence  the execution of the notes. The same facts, evidence, and law support both claims. The court must determine whether or not the plaintiff is liable on the debt. Once that determination is made, the court may enter judgment accordingly. Thus, this court has jurisdiction to hear the defendant's counterclaim, and the plaintiff's motion to dismiss the counterclaim is overruled.
