
571 S.E.2d 872 (2002)
Tony SMITH, Plaintiff,
v.
Staci Day BARBOUR, Defendant.
Tony Smith, Plaintiff,
v.
Staci D. Barbour, Defendant.
Nos. COA01-1519, COA02-285.
Court of Appeals of North Carolina.
December 3, 2002.
*874 Hatch, Little & Bunn, L.L.P., by Helen M. Oliver, Raleigh, for plaintiff-appellee.
Staci D. Barbour, pro se, Angier, defendant-appellant.
GREENE, Judge.
Staci Day Barbour (Defendant) appeals an order for temporary custody filed 8 August 2001 and orders for contempt and modification of temporary custody filed 26 October 2001.[1]
On 23 February 2001, Tony Smith (Plaintiff) filed a complaint against Defendant in the Wake County District Court. The complaint alleged "Plaintiff and Defendant [were] the biological parents of one minor child, ... Kayla Olivia Smith, born November 6, 1999" and stated "[t]he parties ha[d] never been married." Plaintiff sought both temporary and permanent custody of the child. On the same day, Plaintiff initiated a legitimation action in the Wake County Superior Court.
Defendant responded on 26 April 2001 by filing a motion for change of venue to Johnston County, where she and the child resided, based on the convenience of the witnesses. On 21 May 2001, Plaintiff filed a motion for a mental examination of Defendant alleging Defendant had "exhibited numerous mental conditions in the past, including... agoraphobia and extreme anxiety." On 20 July 2001, Defendant filed an amended *875 motion to dismiss the complaint.[2] In her motion, Defendant noted: the minor child's father was Bilal Kanawati; Plaintiff had not previously been adjudicated the child's father; Plaintiff did not have legal standing to bring a custody action; and Plaintiff had filed a separate action for legitimation in the Wake County Superior Court.
The hearing on Plaintiff's request for temporary custody and his motion for a mental evaluation revealed Plaintiff believed himself to be the biological father of Defendant's daughter. Plaintiff was paying child support and had visited with the child until May 2001 "when [D]efendant stopped all visitation." Plaintiff requested the district court allow him visitation pending the outcome of the legitimation proceeding in the superior court.
In an order entered 8 August 2001, the district court treated Plaintiff's complaint as initiating an action for paternity in addition to custody and found in pertinent part that:
4. Defendant is the biological mother of the minor child of this action.... Defendant was married to Bilal Kanawati at the time of the child's birth.
5. Plaintiff believes himself to be the father of the minor child of this action. Plaintiff had visitation with the minor child from [her] birth ... until May 2001, the minor child shares Plaintiff's last name, and ... Defendant never indicated to Plaintiff that he may not be the biological father of the minor child until after the institution of this action.
....
15. At the time of this hearing, Defendant had not filed an [a]nswer to the [c]omplaint. In order for the [district] [c]ourt to permit a hearing on [the][m]otion to [c]hange [v]enue for convenience of witnesses and promoting the ends of justice, an [a]nswer must have been filed prior to the filing of the [m]otion to [c]hange [v]enue.
....
22. There are two pending actions filed in Wake County, this action and the action to legitimate the minor child.
....
24. Wake County is a proper and convenient forum to hear this matter.
25. Plaintiff has standing to pursue this action at the present time.
26. Defendant has suffered from anxiety disorders and ... it is in the best interest of the minor child of this action and there is good cause to [o]rder a[m]ental [e]valuation of ... [D]efendant.
27. It appears to the [district] court, on its own motion[,] that a paternity test would resolve the issue of whether Plaintiff is the biological father of the minor child....
28. It is in the best interest of the minor child that Plaintiff be permitted visitation....
The district court concluded "[t]he best interest of the minor child will be served by the provisions contained in the [o]rder .... and the parties are fit and proper persons to have the[ir] [assigned] roles." The district court then denied both Defendant's motion for a change of venue and her motion to dismiss and granted Plaintiff temporary visitation. The district court also ordered the parties to submit to a paternity test. In the event the paternity test resulted in a finding that Plaintiff was the child's biological father, the district court further ordered Defendant to undergo a mental evaluation. Defendant appealed from this order on 14 August 2001. She filed her answer to Plaintiff's complaint on 28 August 2001.
On 1 October 2001, Plaintiff filed a motion for an order to show cause because, although the results of the court-ordered paternity test indicated Plaintiff was the child's biological father, Defendant had not undergone a mental evaluation. The district court granted Plaintiff's motion and entered an order to show cause why Defendant was not in contempt *876 of the 8 August 2001 order. Also, on 1 October 2001, Plaintiff filed a motion for modification of the 8 August 2001 temporary custody order based on the paternity test results.
Defendant responded on 12 October 2001 by filing an "Objection and Motion to Dismiss Contempt of Court Action" and a "Motion to Dismiss Motion for Modification of Temporary Custody Order." Defendant argued in both motions that due to the pendency of her appeal from the 8 August 2001 order, the district court did not have continuing jurisdiction to rule on Plaintiff's motions.
In an order entered 26 October 2001, the district court found that:
4. Plaintiff and Defendant are the biological parents of the minor child....
....
7. Plaintiff desires additional time with his minor child.
....
10. This matter will not be set for a permanent custody hearing for some time, as Defendant was ordered to undergo a mental evaluation which has not commenced as of the date of this hearing.
....
12. Plaintiff and Defendant are fit and proper persons to share joint legal custody of their minor child, ... with Defendant having primary physical custody and Plaintiff having secondary physical custody.
The district court then denied Defendant's motion to dismiss and increased Plaintiff's visitation rights. In a concurrent order, the district court found Defendant in civil contempt of the 8 August 2001 order for failing to submit to a mental evaluation following the paternity test results. The district court sentenced Defendant to thirty days custody with the opportunity to purge herself of contempt by obtaining a mental evaluation within thirty days of the entry of the contempt order.
The issues are whether: (I) the district court erred in denying Defendant's motion for a change of venue; (II) Plaintiff's filing of a legitimation action in the superior court divested the district court of subject matter jurisdiction to adjudicate the issue of paternity; and (III) the district court erred in granting Plaintiff temporary visitation.

I
Defendant first argues the district court erred in denying her motion for a change of venue because Defendant and her daughter live in Johnston as opposed to Wake County.
Pursuant to N.C. Gen.Stat. § 1-83(2) "[t]he court may change the place of trial ... [w]hen the convenience of witnesses and the ends of justice would be promoted by the change." N.C.G.S. § 1-83(2) (2001). "Whether to transfer venue for this reason, however, is a matter firmly within the discretion of the trial court and will not be overturned unless the court manifestly abused that discretion." Centura Bank v. Miller, 138 N.C.App. 679, 683, 532 S.E.2d 246, 249 (2000). Moreover, "motions for change of venue based on the convenience of witnesses, pursuant to section 1-83(2), must be filed after the answer is filed." McCullough v. Branch Banking & Tr. Co., 136 N.C.App. 340, 350, 524 S.E.2d 569, 575-76 (2000). In this case, Defendant, prior to filing her answer, requested a change of venue based on the convenience of the witnesses. Because we see no abuse of discretion, the district court properly denied her request.

II
Defendant next asserts Plaintiff's filing of a legitimation action in the superior court divested the district court of subject matter jurisdiction to adjudicate the issue of paternity. We agree.
In a legitimation action, upon the putative father's verified, written petition to the clerk of the superior court and the clerk's determination that petitioner is the father of the child, "the [clerk] may ... declare and *877 pronounce the child legitimated."[3] N.C.G.S. § 49-10 (2001). The legitimation serves to confer onto
the father and mother all of the lawful parental privileges and rights, as well as all of the obligations which parents owe to their lawful issue, and to the same extent as if said child had been born in wedlock, and to entitle such child by succession, inheritance or distribution, to take real and personal property by, through, and from his or her father and mother as if such child had been born in lawful wedlock.
N.C.G.S. § 49-11 (2001); see also N.C.G.S. § 49-13 (2001) (right to have child's surname changed to father's). An adjudication of paternity, on the other hand, only serves to equalize between the child's father and mother "the rights, duties, and obligations ... with regard to support and custody of the child." N.C.G.S. § 49-15 (2001). As legitimation thus vests greater rights in the parent and the child than an order adjudicating the child's paternity,[4]seeN.C.G.S. §§ 49-11, 49-13, 49-15, the legitimation proceeding should be given preference when separate actions for both legitimation and paternity are filed.[5]See Lewis v. Stitt, 86 N.C.App. 103, 105, 356 S.E.2d 398, 399 (1987) (holding that once a child has been legitimated, an action for paternity can no longer be maintained).
In this case, Plaintiff filed both the custody action in the district court, which the district court treated as including an action for paternity, and the legitimation action in the superior court. Because the issue of paternity is central to both actions and the legitimation action takes priority over a paternity action, the district court was divested of subject matter jurisdiction to decide the issue of paternity. Consequently, it was error for the district court to order a paternity test in this case.

III
While the district court erred in considering the issue of paternity during the pendency of the legitimation action, we also need to determine whether the district court nevertheless had the authority to enter a temporary custody order. Defendant argues the district court lacked jurisdiction to do so because Plaintiff, in the absence of an adjudication of paternity, was a third party without standing. We disagree.
Both parents and third parties have a right to sue for custody. See N.C.G.S. § 50-13.1(a) (2001) ("[a]ny parent, relative, or other person ... claiming the right to custody of a minor child may institute an action or proceeding for the custody of such child"). In a custody dispute between a parent and a non-parent, the non-parent must first establish that he has standing, based on a relationship with the child, to bring the action. See Ellison v. Ramos, 130 N.C.App. 389, 394, 502 S.E.2d 891, 894 (1998). Thus, "where a third party and a child have an established relationship in the nature of a parent-child relationship, the third party does have standing as an `other person' under *878 N.C. Gen.Stat. § 50-13.1(a) to seek custody." Id. at 395, 502 S.E.2d at 895. The father of a child born out of wedlock will be treated as a third party unless he has either legitimated the child pursuant to sections 49-10, 49-12, or 49-12.1 or had his paternity adjudicated under section 49-14. See Rosero v. Blake, 150 N.C.App. 251, 255-56, 563 S.E.2d 248, 252-53 (2002).
While Plaintiff's legitimation action was still pending at the time the district court entered its temporary custody order in this case, Plaintiff's status for purposes of temporary custody remained that of a third party under Ellison. Yet even as a third party, Plaintiff had standing to bring this action because the district court's findings that the child shared Plaintiff's last name and Plaintiff had visited the child since her birth two years prior to this action indicated the existence of a sufficient relationship.[6] As such, the trial court had the authority to enter a temporary custody order.
It was, however, error for the trial court to order temporary visitation to Plaintiff in the absence of any notice to the child's presumed father, Bilal Kanawati, who was a necessary party to the action. "The term `necessary party' embraces all persons who have a claim or material interest in the subject matter of the controversy, which interest will be directly affected by the outcome of the litigation." Lombroia v. Peek, 107 N.C.App. 745, 750, 421 S.E.2d 784, 787 (1992); N.C.G.S. § 1A-1, Rule 19(b) (2001). In an action brought by a putative father or a non-parent claiming custody of a child born during the mother's marriage to her husband, the husband is thus a necessary party to the proceeding, unless he has previously been determined not to be the child's father. See Lombroia, 107 N.C.App. at 750, 421 S.E.2d at 787. Because Bilal Kanawati, Defendant's former husband, was a necessary party in this case but did not receive notice of the temporary custody proceeding, the trial court erred in entering its 8 August 2001 order in its entirety.[7]
As the trial court lacked subject matter jurisdiction to hear either the paternity or the custody action, this case must be reversed as to the paternity portion and reversed and remanded as to the custody portion[8] of the district court's 8 August 2001 order. Furthermore, all orders in this case entered after 8 August 2001 based on the results of the paternity test ordered by the district court are void. This includes the district court's order holding Defendant in civil contempt.[9]
Reversed and remanded in part.
Judges WYNN and McGEE, concur.
NOTES
[1]  These orders are clearly interlocutory. Assuming without deciding that they do not implicate a substantial right, we exercise our discretion and grant certiorari to hear this appeal. See N.C.R.App. P. 21(a)(1).
[2]  The record does not include the initial motion to dismiss.
[3]  When paternity is disputed in a legitimation action, the clerk is required to "transfer the proceeding to the appropriate court." N.C.G.S. § 1-301.2(b) (2001). With respect to the issue of paternity, the appropriate court is the district court. See N.C.G.S. § 49-14 (2001); e.g., Davis v. N.C. Dept. of Human Resources, 126 N.C.App. 383, 485 S.E.2d 342 (1997) (paternity action brought in district court), aff'd and rev'd in part, 349 N.C. 208, 505 S.E.2d 77 (1998); see also N.C.G.S. § 7A-244 (district court proper division for domestic relations cases).
[4]  Although greater in number, because the rights granted upon legitimation of a child vary only slightly from the rights conveyed upon an action of paternity, it would not only be good public policy but also further judicial efficiency if the legislature amended section 49-14 so that an adjudication of paternity would constitute a per se legitimation of the child. See Homer H. Clark, Jr., The Law of Domestic Relations in the United States § 4.3, at 174 (2d ed.1988) (proposing that in states where this is not yet the case "the statute should be phrased to include the paternity suit as a source of legitimation for all purposes").
[5]  Without such a preference, we would simply be promoting a race to the courthouse based on assumptions as to which judge will best decide the issue of paternity.
[6]  As Defendant did not assign error to these findings, they are deemed to be supported by competent evidence. See Anderson Chevrolet/Olds v. Higgins, 57 N.C.App. 650, 653, 292 S.E.2d 159, 161 (1982).
[7]  We note the trial court has the authority under the appropriate circumstances to enter ex parte temporary custody orders. See N.C.G.S.§ 50-13.5(d)(2)-(3) (2001). The record in this case, however, reflects no circumstances warranting suspension of the notice requirement.
[8]  The district court's temporary custody order in this case cannot survive absent notice to all necessary parties. Although N.C. Gen.Stat. § 50-13.5(e)(3) provides that "[i]n the discretion of the court, failure of ... service of notice shall not affect the validity of any order or judgment entered," N.C.G.S. § 50-13.5(e)(3) (2001), this section applies only to orders entered with respect to support actions, see N.C.G.S. § 50-13.5(e) (2001); see also Broaddus v. Broaddus, 45N.C.App. 666, 263 S.E.2d 842 (1980) (applying former version of section 50-13.5(e)(3) to custody action where section specifically referred to custody as opposed to child support proceedings).
[9]  The order for contempt necessarily fails because the district court's order of a mental evaluation of Defendant was premised on its order of a paternity test.
