
599 P.2d 356 (1979)
In re the MARRIAGE OF Janet M. and Christopher J. McDONALD.
Janet M. McDONALD, Petitioner and Respondent,
v.
Christopher J. McDONALD, Respondent and Appellant.
No. 14419.
Supreme Court of Montana.
Submitted on Briefs May 9, 1979.
Decided September 5, 1979.
*357 Dave B. Kinnard, Billings, for respondent and appellant.
Gary L. Beiswanger, Billings, for petitioner and respondent.
SHEA, Justice.
This is an appeal by the father from two orders of the Yellowstone County District Court, one which refused to modify a divorce settlement and decree placing custody in the mother, and the second from an order awarding the mother attorney fees and costs generated from her defense of the father's modification petition.
The appeal from the December 22, 1977 order is dismissed as it came after the filing deadline; however, the order granting attorney fees to the mother is reversed because the time had expired within which the mother had a duty to act.
On January 5, 1976, the Yellowstone County District Court entered a decree of dissolution which incorporated a separation agreement expressing the parties' desire to give the mother custody of their two minor children, subject to visitation by the father. However, on August 17, 1977, the father filed a petition for modification of the prior dissolution decree and alleged that custody of the children should be transferred to him.
In an order filed December 22, 1977, the District Court denied the father's petition, finding that he had not satisfied the requirements of section 40-4-219, MCA, and therefore could not modify the original decree. The order also provided that both parties should bear their own costs and attorney fees. Notice of entry of the order was filed on December 30, 1977. It was not until five months later that a notice of appeal was filed.
Almost three months after the order denying modification, the mother filed a petition for an order requiring the father to pay a reasonable amount for costs and attorney fees incurred by the mother in defending against the father's modification petition. The District Court order granting the mother's petition was filed May 17, 1978.
On May 26, 1978, the father filed a notice of appeal, appealing not only from the order relating to attorney fees, but also from the December 1977 order denying his petition for modification of custody.
Clearly, we cannot determine the appeal in relation to modification of custody; but just as clearly, we must reverse the District Court in its decision awarding attorney fees and costs, for the time period had long expired.
Rule 5, Mont.R.App.Civ.P., provides that appeal from an order must be taken within thirty days of its entry except that in cases where service of notice of entry is required, the time for appeal shall be thirty days from the service of notice of entry of judgment. Here, service of notice of entry of the District Court order was made on December 30, 1977. The father filed his appeal of this order on May 26, 1978, and the expiration of the thirty day time limit deprived this Court of jurisdiction to hear this appeal. The mother's later petition for attorney fees, under the circumstances here, did not affect the thirty day limitation for filing an appeal.
*358 The District Court's December 22, 1977 order denying the father's modification petition provided in part that both parties were to bear their own attorney fees and costs. But almost three months later, on March 17, 1978, the mother petitioned the District Court for an order requiring the father to pay a reasonable amount for the costs and attorney fees incurred by her in defense of the modification action filed by the father. On May 17, 1978, the District Court filed an order based on section 40-4-110, MCA, which required the father to pay the sums of $1,491 to the mother's attorney and $1,000 directly to the mother. Clearly, the District Court had no such authority.
Rule 59(g), Mont.R.Civ.P. provides: "A motion to alter or amend the judgment shall be served not later than 10 days after the service of the notice of the entry of judgment ..." This rule applies to petitions for costs and attorney fees filed after entry of judgment. Stacy v. Williams (1970), 50 F.R.D. 52 (construing Rule 59(e), Fed.R.Civ.P., which is identical in content to Rule 59(g), Mont.R.Civ.P.); Lichtenstein v. Lichtenstein (1972), 55 F.R.D. 535 (construing Rule 59(e), Fed.R.Civ.P.); see also M & R Construction Co. v. Shea (1979) Mont., 589 P.2d 138, 36 St.Rep. 37 (this Court applied Rule 59(g) to a motion to strike judgment for attorney fees). Proper application of the rules clearly prohibited granting of the requested relief to the mother in this case.
Notice of entry of the District Court order requiring both parties to bear their own costs and attorney fees was served on the father on December 30, 1977. Having failed to file her petition for costs and attorney fees within ten days of service, the District Court was without jurisdiction to give the mother the requested relief.
Though the relief granted in the face of the existing procedural rules is highly unusual, the trial court did not bother to explain the basis of its decision to grant the requested relief to the mother. It is highly unlikely that an appeal would have resulted had the trial court properly applied the rules of civil procedure to the application for attorney fees and costs, filed three months after entry of the final order.
By not appealing the December 22, 1977 order denying the petition to modify custody, the father had obviously decided to forego an appeal. But three months later, he was faced with the mother's petition to award her attorney fees and costs incurred as a result of defending the father's petition to modify custody. The District Court had unequivocally ruled that both parties were to pay their own attorney fees and costs. The mother could have petitioned the District Court, within the procedural time limits, to reconsider that ruling, or could have appealed that ruling within thirty days, but did neither. The District Court's ruling granting the mother's petition compelled the father to appeal unless he could persuade the District Court to change its order granting attorney fees and costs to the mother.
We recognize, of course, the right of the father under the rules of civil procedure to appeal from the District Court order without first petitioning the District Court to correct the alleged error. But this is not to say that we encourage such direct appeals. The father could have filed a motion requesting the District Court to correct its order. If it has been done, and if the District Court did correct its error, it is unlikely that the mother would have appealed. Moreover, if she had appealed, being that her position obviously had no foundation in the law, it could well have been classified by this Court as frivolous under Rule 32, Mont.R.App.Civ.P., with appropriate sanctions being the result. Furthermore, if the District Court denied the father's motion to correct such a patent error, nothing would have been lost. Conceivably, the District Court would even have explained the basis for its ruling granting the mother's motion.
But turning solely to the patently erroneous ruling of the District Court, an appeal was in order. This being so, the father undoubtedly thought he had nothing to lose by also requesting this Court to review on the merits, the original decision of the District *359 Court denying his petition to modify the custody decree.
A more careful and conscientious application of the rules by the trial courts, and a more careful analysis by the lawyers of the procedural options available to correct errors of the trial courts, will undoubtedly benefit the court system, and save much time and money for the parties involved, an objective which lawyers should not lose sight of.
For the above reasons, the father's appeal from the District Court order of December 22, 1977 denying custody modification is dismissed. This Court has no jurisdiction to hear this appeal. On the other hand, the District Court order of May 17, 1977, granting attorney fees and costs to the mother is reversed  the District Court had lost jurisdiction to enter the order.
HASWELL, C.J., and DALY, HARRISON and SHEEHY, JJ., concur.
