
335 A.2d 339 (1975)
Nathan J. HELGERSON
v.
MAMMOTH MART, INC.
v.
Vincent O'HALLORAN.
No. 73-287-Appeal.
Supreme Court of Rhode Island.
April 2, 1975.
*340 Gunning, LaFazia, Gnys & Selya, Edward L. Gnys, Jr., J. Renn Olenn, for third-party plaintiff, Mammoth Mart, Inc.
Keenan, Rice, Dolan, Reardon & Kiernan, Rodercick A.J. Cavanagh, Dennis S. Baluch, for third-party defendant. Vincent O'Halloran.

OPINION
PAOLINO, Justice.
This case is before us on an appeal filed by the third-party plaintiff, Mammoth Mart, Inc., from an order entered in the Superior Court granting a motion of the third-party defendant, O'Halloran, for a summary judgment.
The action was commenced by a complaint filed by plaintiff, Nathan J. Helgerson, in 1971, alleging that defendant, Mammoth Mart, "sometime between July 13, 1970 and July 15, 1970," stored ammunition for a pistol "* * * in full view of the public in a display case which was so broken that ammunition could be taken from it by patrons of the store." The complaint further alleged that as a result of Mammoth Mart's negligence in keeping the show case in such condition, a minor (later identified as third-party defendant, O'Halloran), took ammunition from the display case, thereafter placed it in a pistol, and discharged it, thereby injuring plaintiff.
In answer to interrogatories, plaintiff stated that on the day of his injury he was at home. He heard a crash in his upstairs bedroom  someone had shot through the window. He called the police. They checked the area behind the house and found 22-caliber cartridges. Later in the day, he heard gunshots again. He went down to the cove of the reservoir where there was shooting. The plaintiff was struck by one of the bullets. The police were there and they caught O'Halloran as he turned to run away.
The plaintiff also filed suit against O'Halloran. He sought to consolidate that suit with the case at bar, but his motion to consolidate was denied.
Mammoth Mart thereafter obtained leave of court to file a third-party complaint for indemnity against O'Halloran. The latter filed an answer denying the right to indemnity and asserting that there was "no legal basis for indemnity in contract or tort" and also setting forth that O'Halloran had entered into a settlement agreement with plaintiff and obtained a release from plaintiff which discharged him (O'Halloran) from all liability.[1]
The third-party defendant O'Halloran then filed a motion for summary judgment. He based this motion on the second and third defenses of his answer to the third-party complaint.[2] After a hearing thereon, the trial justice granted the motion. An order to that effect was entered, whereupon Mammoth Mart filed this appeal.
While we do not know the basis of the trial justice's decision, it is fair to assume *341 that she agreed with the defense set forth by third-party defendant O'Halloran in answer to the complaint filed by third-party plaintiff Mammoth Mart. For the reasons that follow we believe the trial justice erred and, therefore, we reverse.
The sole issue raised on this appeal is whether the trial justice erred in granting summary judgment for the third-party defendant in an action for indemnity. The resolution of this question requires us to determine under what circumstances a third-party plaintiff can seek indemnity from a third-party defendant.
In this state the right of indemnity is preserved by statute. General Laws 1956 (1969 Reenactment) § 10-6-9.[3]See City of Pawtucket v. A.F. & F. Bray, 20 R.I. 17, 37 A. 1 (1897). Although the right to indemnity traditionally arose from a contract, express or implied, modern law indicates a trend to allow indemnity on the basis of equity, for example, where one person is exposed to liability by the wrongful act of another in which he does not join. See San Mateo Union High School Dist. v. Yamas, 22 Cal. App.3d 185, 99 Cal. Rptr. 258 (1971); 41 Am. Jur.2d Indemnity § 2 at 688 (1968). Mammoth Mart argues for indemnity upon equitable considerations. We agree that this concept is sound and should be followed in this state. Mammoth Mart contends that O'Halloran was actively negligent while it (Mammoth Mart) was only passively negligent, if negligent at all. Perry v. St. Jean, 100 R.I. 622, 218 A.2d 484 (1966). Hence, it concludes, if found guilty of negligence, it may seek indemnification from O'Halloran. The latter counters that the release obtained from plaintiff operates as a satisfaction of any claim against him and that it is similarly a bar to indemnification since, by virtue of the release, he is no longer "liable in tort." He cites Zarrella v. Miller, 100 R.I. 545, 548, 217 A.2d 673, 675 (1966), where we had occasion to define the words "liable in tort" as used in § 10-6-2.
We cannot agree with O'Halloran's position with respect to the release. The release involves only the rights of plaintiff against O'Halloran. It does not affect the relative rights of the indemnitor and indemnitee. Thus, although O'Halloran may have obtained a release from Helgerson, it was not effective so as to relieve O'Halloran from a claim for indemnity by Mammoth Mart. This view is consistent with the provisions of § 10-6-9 and Super. R. Civ. P. 14, which deals with third-party practice.[4] Since the purpose of an action for indemnity is to have the party primarily liable hold the one secondarily liable harmless, then if Mammoth Mart is entitled to indemnity, O'Halloran is liable for the whole outlay and not just a pro rata share. The release obtained by O'Halloran provides only that the release should operate as a satisfaction of Helgerson's claim against other parties to the extent of the relative pro rata share of common liability of the payor released. Section 10-6-8. If ultimately O'Halloran must indemnify Mammoth Mart, he can use the amount paid to Helgerson to reduce the amount to be paid plaintiff.
Under the facts alleged, it may well be that the evidence will establish that O'Halloran's act was the active and primary cause of the plaintiff's injury. At *342 the pleading stage it is virtually impossible to ascertain the right of Mammoth Mart to indemnity. The pleadings do show, however, that Mammoth Mart may be entitled to indenmity. A third-party complaint should not be dismissed unless it appears from the pleadings that in no event could the third-party plaintiff have an action against the third-party defendant. Since Mammoth Mart may be entitled to indemnity, it was error for the trial justice to grant O'Halloran's motion for summary judgment.
The appeal of the third-party plaintiff, Mammoth Mart, Inc., is sustained, the order appealed from is reversed, and the cause is remanded to the Superior Court for further proceedings.
NOTES
[1]  The record shows that plaintiff had executed a joint tortfeasor release discharging O'Halloran from all liability resulting from the incident involved in this case.
[2]  The second defense asserts:

"There is no legal basis for indemnity in contract or tort against this third-party defendant on the basis of the action brought by the primary plaintiff against the primary defendant."
The third defense asserts:
"That the primary plaintiff brought an action against the third-party defendant in Providence Superior Court which was reached for trial and settled by stipulation. As consideration of the settlement, a release was executed a copy of which is attached hereto and made a part hereof. By this release, the plaintiff discharged the third-party defendant from all liability and the third-party plaintiff cannot maintain the instant action against the third-party defendant."
[3]  General Laws 1956 (1969 Reenactment) § 10-6-9 reads as follows:

"Right of indemnity preserved.  This chapter does not impair any right of indemnity under existing law."
[4]  Super. R. Civ. P. 14(a) reads, in pertinent part, as follows:

"At any time after commencement of the action a defendant, as a third-party plaintiff, may cause a summons and complaint to be served upon a person not a party to the action who is or may be liable to him for all or part of the plaintiff's claim against him."
