
814 So.2d 867 (2001)
Ex parte Eddie Ray BAILEY.
(In re Eddie Ray Bailey v. Commercial Metals Company et al.)
1000499.
Supreme Court of Alabama.
September 7, 2001.
*868 Michael K. Beard and Thomas M. Powell of Marsh, Rickard & Bryan, P.C., Birmingham, for petitioner.
Joe L. Leak of Friedman, Leak & Bloom, P.C., Birmingham, for respondent Doster Construction Company, Inc.
WOODALL, Justice.
Eddie Ray Bailey, the plaintiff in an action pending in the Jefferson Circuit Court, petitions for a writ of mandamus directing the trial court to set aside its order of November 2, 2000; that order granted a motion filed by one of the defendants, Doster Construction Company, Inc., to strike Bailey's second amendment to his complaint. We grant the petition and issue the writ.
Bailey was injured in a construction-site accident on October 29, 1999. On February 29, 2000, Bailey sued Commercial Metals Company, SMI Joist Company, and Doster Construction Company, Inc. ("Doster").[1] In his complaint, Bailey alleged that Doster was the general contractor on the job where he was working, that Doster had negligently or wantonly failed to provide him with a reasonably safe work environment, that Doster had negligently or wantonly failed to institute procedures to ensure that the structure on which he was working was secure, and that Doster had negligently or wantonly failed to ensure that that structure was adequately welded and braced. Bailey alleged that he was injured when the structure on which he was working collapsed, causing him to fall more than 30 feet.
On April 5, 2000, Doster answered Bailey's complaint, admitting that it was the contractor on the construction job where Bailey was injured, denying that it was guilty of any negligence or wantonness, and asserting various affirmative defenses. On July 14, 2000, Bailey filed the first amendment to his complaint, substituting a named defendant for a fictitiously named party.
The parties proceeded with discovery; no trial date was set. During discovery, Doster produced a copy of its construction *869 contract for the project on which Bailey was injured. Soon thereafter, on September 1, 2000, Bailey filed a second amendment to his complaint, asserting a breach-of-contract claim against Doster. In substance, Bailey alleged that he was a third-party beneficiary of the construction contract between Doster and the owner, that that contract contained various safety provisions, and that Doster had breached the contract by permitting unsafe conditions to exist in the workplace, and by failing to provide proper safety devices for Bailey's use.
On September 22, 2000, Doster filed a motion to strike or dismiss the second amendment to the complaint, or, in the alternative, to require a more definite statement. Bailey responded to the motion on October 12, 2000. In his response he discussed several cases that he contended supported his third-party-beneficiary claim.
On November 2, 2000, the trial court, without explanation, granted Doster's motion to strike the second amendment to the complaint. On November 14, 2000, Bailey filed a motion to reconsider, which the trial court denied on November 21, 2000, also without explanation. In response, Bailey filed this petition for a writ of mandamus.
"A writ of mandamus is an extraordinary remedy that requires the showing of: (1) a clear legal right in the petitioner to the order sought; (2) an imperative duty on the respondent to perform, accompanied by a refusal to do so; (3) the lack of another adequate remedy; and (4) the properly invoked jurisdiction of the court." Ex parte McNaughton, 728 So.2d 592, 594 (Ala.1998), cert. denied sub nom. McNaughton v. United Healthcare Serv., Inc., 528 U.S. 818, 120 S.Ct. 59, 145 L.Ed.2d 52 (1999).
Doster argues that the petition should not be granted because, it says, Bailey has another adequate remedy by way of appeal. However, "[t]his Court has previously issued a writ of mandamus directing a circuit judge to allow plaintiffs to amend their complaints, ... where ... amendment of the complaint would not unduly delay the judicial process or prejudice the substantial rights of any parties." Ex parte Cincinnati Ins. Co., 689 So.2d 47, 49 (Ala.1997), citing Huskey v. W.B. Goodwyn Co., 295 Ala. 1, 321 So.2d 645 (1975). Doster did not argue to the trial court or to this Court that allowing the second amendment to the complaint would cause any delay or would prejudice in any way any right of any party.
Doster argues that the trial court did not abuse its discretion in striking Bailey's second amendment to his complaint. However, Rule 15(a), Ala. R. Civ. P., provides that amendments of pleadings "shall be freely allowed when justice so requires." A trial judge does not have unbridled discretion to refuse such an amendment.
"We simply state here that if Rule 15 is to be of any benefit to the bench, bar, and the public, the trial judges must be given discretion to allow or refuse amendments. However, we state that amendments are to be freely allowed and refusal of an amendment must be based on a valid ground. We state also that Rule 15 must be liberally construed by the trial judges. But, that liberality does not include a situation where the trial on the issues will be unduly delayed or the opposing party unduly prejudiced."
Stead v. Blue Cross-Blue Shield of Alabama, 294 Ala. 3, 6, 310 So.2d 469, 471 (1975) (emphasis supplied). When it granted the motion to strike, the trial court did not state any ground for doing so. Doster, who did not claim that the *870 amendment would result in undue delay or prejudice, has not provided any valid ground for the trial court's order.
We conclude that Bailey had a clear legal right to amend his complaint to assert a third-party-beneficiary breach-of-contract claim against Doster. The amendment was filed promptly after Bailey received a copy of the construction contract during discovery. At the time Bailey filed the second amendment, the case had not been set for trial, and it is uncontested that the amendment would not cause undue delay or prejudice the substantial rights of any party. Therefore, we grant the petition and issue the writ of mandamus.
PETITION GRANTED; WRIT ISSUED.
HOUSTON, SEE, LYONS, BROWN, JOHNSTONE, HARWOOD, and STUART, JJ., concur.
NOTES
[1]  Doster is the only respondent to Bailey's petition for the writ of mandamus.
