
344 So.2d 1302 (1977)
FIRST CHURCH OF CHRIST SCIENTIST and St. Paul Fire and Marine Insurance Company, Appellants,
v.
CITY OF ST. PETERSBURG, a Municipal Corporation, et al., Appellees.
No. 76-1558.
District Court of Appeal of Florida, Second District.
April 20, 1977.
*1303 Bernard Kanner of Law Office of Glenn M. Woodworth, St. Petersburg, for appellants.
B. Norris Rickey, Asst. City Atty., St. Petersburg, for appellee, City of St. Petersburg.
BOARDMAN, Chief Judge.
Appellants/defendants/third-party plaintiffs, First Church of Christ Scientist and St. Paul Fire and Marine Insurance Company, appeal the dismissal of their third-party complaint with prejudice.
A complaint was filed by Aderian McKenzie seeking damages for injuries suffered by her as a result of an automobile accident. Aderian was struck by an automobile after she exited a bus which was to have transported her from her home to church. Two of the defendants, First Church and St. Paul Fire and Marine, filed a third-party complaint against the city of St. Petersburg and two others for indemnity or contribution. The third-party complaint was dismissed for failure to state a cause of action.
The second count of the third-party complaint included the following allegations. The city had contracted with First Church to provide a bus and operator to transport persons to church. The city, through its employee, had exclusive control over the bus at the time of the accident and negligently permitted Aderian to leave the bus. Aderian's injuries were directly and proximately caused by breach of contract in that the city failed to perform its contractual duties to
a) provide a competent and reasonably prudent bus operator;
b) exercise the highest degree of care, as a common carrier, for the safety of the "CHURCH's" congregation, in transporting them to and from church; [and]
c) to exercise reasonable care under the circumstances in the performance of its obligation to the "CHURCH" in the furnishing of said bus and bus operator.
The third count included the following allegations. The city breached its duty to exercise reasonable care under the circumstances and to exercise the highest degree of care of a common carrier. Aderian's injuries were caused as a direct and proximate result of the city's active negligence. First Church's negligence, if any, was passive and any liability to Aderian was vicarious.
It is a firmly grounded rule of procedure that a motion to dismiss for failure to state a cause of action is determined solely by reference to the allegations of the complaint. See, e.g., Bond v. Koscot Interplanetary, Inc., 246 So.2d 631 (Fla.4th DCA 1971). The third-party plaintiff is not confined "to the version of the facts asserted by the plaintiff in the first instance," but is permitted to present his own version of the facts, and the allegations, and all reasonable inferences arising from those allegations are deemed admitted by the movant for the purpose of disposing of the motion. See Seaboard Coast Line R.R. Co. v. Brown, 297 So.2d 843, 844 (Fla.2d DCA 1974); Bond, supra.
*1304 The obligation to indemnify arises from an express or implied contractual relationship between the tortfeasors. Mims Crane Service, Inc. v. Insley Mfg. Corp., 226 So.2d 836 (Fla.2d DCA 1969). An implied contractual obligation to indemnify has been constructed from a violation of a duty owed to the third-party plaintiff by the third-party defendant and from the passive negligence of the third-party plaintiff as compared with the active negligence of the third-party defendant. See Florida Power Corp. v. Taylor, 332 So.2d 687 (Fla.2d DCA 1976); Stuart v. Hertz Corp., 302 So.2d 187 (Fla.4th DCA 1974); Maybarduk v. Bustamante, 294 So.2d 374 (Fla.4th DCA 1974). We hold that the third-party complaint stated a cause of action against the city under both of these theories. It alleges in count two that the city breached a duty owed to First Church established by contract. It alleges in count three that the city's negligence was active or primary and the negligence, if any, of First Church was passive or secondary.
The third-party complaint also stated a cause of action in both counts under the recently enacted "Uniform Contribution Among Tortfeasors Act," Section 768.31, Florida Statutes (1975), should the trier of fact find First Church and the city to be joint tortfeasors. See Taylor, supra.
This opinion is not to be construed or interpreted as passing on the merits of the third-party complaint.
REVERSED and REMANDED for proceedings consistent with this opinion.
HOBSON and SCHEB, JJ., concur.
