Suppose that R is a commutative ring with 1 ≠ 0. In this paper, we introduce the concept of 2-absorbing ideal which is a generalisation of prime ideal. A nonzero proper ideal I of R is called a 2-absorbing ideal of R if whenever a, b, c ∈ R and abc ∈ I, then ab ∈ I or ac ∈ I or bc ∈ I. It is shown that a nonzero proper ideal I of R is a 2-absorbing ideal if and only if whenever I1I2I3 ⊆ I for some ideals I1,I2,I3 of R, then I1I2 ⊆ I or I2I3 ⊆ I or I1I3 ⊆ I. It is shown that if I is a 2-absorbing ideal of R, then either Rad(I) is a prime ideal of R or Rad(I) = P1 ⋂ P2 where P1,P2 are the only distinct prime ideals of R that are minimal over I. Rings with the property that every nonzero proper ideal is a 2-absorbing ideal are characterised. All 2-absorbing ideals of valuation domains and Prüfer domains are completely described. It is shown that a Noetherian domain R is a Dedekind domain if and only if a 2-absorbing ideal of R is either a maximal ideal of R or M2 for some maximal ideal M of R or M1M2 where M1,M2 are some maximal ideals of R. If RM is Noetherian for each maximal ideal M of R, then it is shown that an integral domain R is an almost Dedekind domain if and only if a 2-absorbing ideal of R is either a maximal ideal of R or M2 for some maximal ideal M of R or M1M2 where M1,M2 are some maximal ideals of R.