
35 Wn. App. 517 (1983)
667 P.2d 1124
THE CITY OF ALGONA, ET AL, Appellants,
v.
THE CITY OF PACIFIC, Respondent.
No. 10521-3-I.
The Court of Appeals of Washington, Division One.
August 10, 1983.
*518 Johnson & Crane and Ernest F. Crane, for appellants.
Donald Ryan, Jr., for respondent.
ANDERSEN, C.J.

FACTS OF CASE
The City of Algona appeals from a summary judgment dismissing its suit against the City of Pacific.[1] Algona's suit sought a mandatory injunction requiring Pacific to do whatever is necessary to provide sewer services to those portions of Algona which were formerly served by a sewer line running under Fifth Avenue, the street forming the boundary between these two King County cities.
In 1970, Algona and Pacific entered into agreements to jointly construct, operate and maintain a sanitary sewage system for the two cities. The Joint Maintenance and Operation Agreement between the cities dated July 27, 1970 is the one pertinent to this action. This agreement was for a term of 35 years, thereafter being terminable by either party on 1 year's notice to the other.
The Joint Maintenance and Operation Agreement provided in part as follows: its purpose was to provide sanitary sewer services to all areas within the respective boundaries of the two cities, including areas subsequently annexed to each; the parties were to jointly participate in the use of certain sewer lines owned by the other and each was to permit the other to discharge sewage into certain of the facilities owned by the other; the parties agreed to maintain and operate those facilities within their respective city limits; *519 and the expenses of operation, including new hookups, were to be handled and paid for according to detailed provisions set forth in the agreement. With respect to the sewer lines in Pacific, the agreement specifically provided that "Algona may use such lines as lateral sewers to serve property adjacent to such lines" and "Algona shall have the right to connect thereto additional side sewer stubs and connecting lateral sewers".
The sewer line in question was under Fifth Avenue, the street dividing the two cities, and was on the Pacific side of the street.
Two years after the parties entered into their Joint Maintenance and Operating Agreement, and during preparation for the construction of State Highway 167 (the Valley Freeway), the State deemed it necessary to relocate the Fifth Avenue sewer line. On September 25, 1972, the State and Pacific entered into an agreement providing for relocation of the Fifth Avenue sewer line elsewhere in Pacific at state expense. The sewer relocation work started in 1974 and was completed in 1975. Algona was not a party to the agreement between Pacific and the State.
Then in the spring of 1978, Mr. and Mrs. Elmer L. McKenzie purchased property in Algona, which Algona officials had advised them was served by the Fifth Avenue sewer line. In due course, the McKenzies were dismayed to discover that although the Fifth Avenue sewer line was on the Algona utility maps, it was no longer under Fifth Avenue.
On April 20, 1979, Algona commenced this action seeking an injunction to affirmatively require Pacific to provide sewer services to the McKenzies and other Algona residents whose property would have been served by the Fifth Avenue sewer had it not been relocated.
The trial court entered what amounted to a summary judgment dismissing Algona's action on the ground that the statute of limitations had run.
Algona's appeal presents one determinative issue.


*520 ISSUE
Was Algona's action against Pacific barred by any statute of limitation?

DECISION
CONCLUSION. Even though more than 6 years had elapsed between the time Pacific contracted with the State to move the Fifth Avenue sewer line, and the time this action based on the Joint Maintenance and Operating Agreement between Pacific and Algona was commenced, Algona's action based on that contract was not barred.
The 6-year statute of limitations pertaining to actions "upon a contract in writing, or liability express or implied arising out of a written agreement", RCW 4.16.040(1), is the one applicable to Algona's action on the Joint Maintenance and Operating Agreement between it and Pacific. See RCW 4.16.160.
[1] Algona's argument that Pacific was acting in its sovereign capacity and should not be held subject to the statute of limitations, citing Tacoma v. Hyster Co., 93 Wn.2d 815, 821, 613 P.2d 784 (1980), is without merit since a municipality furnishing sewer facilities is acting in its proprietary capacity, Seattle v. Stirrat, 55 Wash. 560, 564-66, 104 P. 834 (1909).
[2] Similarly, Algona's arguments predicated on the theory that it had also pleaded a tort cause of action are nonmeritorious. "Whether an action sounds in contract or tort is determined from the pleadings and complaint as a whole and the evidence relied upon, not by particular words and allegations, the form adopted by the pleader, what the pleader calls it, or the understanding of counsel or the trial court." Gazija v. Nicholas Jerns Co., 86 Wn.2d 215, 218, 543 P.2d 338 (1975). The record presented demonstrates that the cause of action herein is based on the Joint Maintenance and Operating Agreement and sounds in contract, not tort.
The parties' arguments concerning whether the time of discovery is what starts the running of the statute of limitations, *521 see U.S. Oil & Ref. Co. v. Department of Ecology, 96 Wn.2d 85, 92, 633 P.2d 1329 (1981), or not, see Taylor v. Puget Sound Power & Light Co., 64 Wn.2d 534, 538, 392 P.2d 802 (1964), is also not the determinative factor as we analyze the issue before us.
[3] The statute of limitations in a contract action begins to run at the time of the breach. Taylor v. Puget Sound Power & Light Co., supra; 18 S. Williston, Contracts § 2021A, at 697 (3d ed. 1978). Pacific argues that any breach of contract by it occurred at the time it contracted with the State to move the sewer line, thus putting it beyond Pacific's power to perform any obligations it might owe with respect to the sewer line in question under the Joint Maintenance and Operating Agreement. Since the date of Pacific's contract with the State was September 25, 1972, this suit would be barred by the 6-year contract statute of limitations if we accept that view. On the other hand, Algona argues that its cause of action did not arise until later. Algona is correct.
"A breach of contract is a non-performance of any contractual duty of immediate performance." Restatement of Contracts § 312, at 462 (1932). The focal issue then becomes, when did the duty of immediate performance arise under this contract?
The parties' contract gave Algona the continuing right to connect to and use Pacific's sewer line under Fifth Avenue to provide sewer services to Algona residents, present and future, whose property is adjacent to that sewer line. Thus Pacific's duty of immediate performance did not arise until demand was made to Pacific to provide sewer service to the McKenzie family which lived in Algona. Sethre v. Washington Educ. Ass'n, 22 Wn. App. 666, 671, 591 P.2d 838 (1979). Since that demand was not made until the spring of 1978, the contract statute of limitations had not run at the time this action was commenced.
Pacific vigorously argues, however, to the effect that if it breached its agreement with Algona by contracting with the State on September 25, 1972 to move the sewer line in *522 question, that amounted to a repudiation of the contract and constituted an anticipatory breach of the contract triggering the running of the statute of limitations. See McFerran v. Heroux, 44 Wn.2d 631, 640, 269 P.2d 815 (1954).
[4] Even if we accept Pacific's argument in that regard, it does not avail Pacific by acting as a bar to the present action since the law with respect to when the statute of limitations commences to run in anticipatory breach cases is otherwise. The rule in this regard is stated in Restatement of Contracts § 322, at 483 (1932):
When Statute of Limitations Begins to Run in Case of Anticipatory Breach.
If no action on an anticipatory breach is brought before the time fixed by the contract for the beginning of performance by the party who has committed such a breach, the period of the Statute of Limitations begins to run only from the time so fixed by the contract.
Comment:

a. The party injured is given an election whether he will regard an anticipatory repudiation as final, though he cannot recover unnecessarily enhanced damages incurred by continuing performance in disregard of repudiation. His failure to regard repudiation as final is advantageous to the wrong-doer, since he is thus given an enlarged opportunity of nullifying the effect of the repudiation under § 319, and therefore should not work prejudice to the injured party in the calculation of the period of the Statute of Limitations.
Accord, Dill v. PUD 2, 3 Wn. App. 360, 364-65, 475 P.2d 309 (1970); Boyer v. Yakima, 156 Wash. 518, 521-24, 287 P. 211 (1930); 4 A. Corbin, Contracts § 989, at 967 (1951). Thus, Algona could have treated the repudiation, if such it was, as final and sued on it at the time or could have waited as it did; the election was Algona's, so whether it knew about the breach at the time or found out about it later was also immaterial.
Algona's breach of contract action was timely commenced and the trial court erred in entering a summary judgment, based on the statute of limitations, dismissing the case.
*523 Having decided this case on the basis stated, we need not address the other contentions of the parties.
Reversed and remanded for further proceedings consistent herewith.
WILLIAMS and RINGOLD, JJ., concur.
Reconsideration denied September 20, 1983.
Review denied by Supreme Court December 2, 1983.
NOTES
[1]  The State of Washington was formerly a party defendant but was dismissed out by agreement of the parties. Mr. and Mrs. Elmer L. McKenzie, two residents of Algona, are parties plaintiff and appellants herein, but since no issue is presented by this appeal with respect to the McKenzies' status in the case, for convenience we refer to the City of Algona as though it were the sole plaintiff and appellant.
