© 2021 Taylor & Francis Group, LLC.The purpose of the paper is to introduce and study weakly 2-prime ideals in commutative rings. Let A be a commutative ring with a nonzero identity. A proper ideal P of A is said to be a weakly 2-prime ideal if whenever (Formula presented.) for some (Formula presented.) then (Formula presented.) or (Formula presented.) Besides giving various examples and characterizations of weakly 2-prime ideals, we investigate the relations between weakly 2-prime ideals and other classical ideals such as 2-prime ideals, weakly prime ideals and weakly 2-absorbing primary ideals. Furthermore, we study 2-prime avoidance lemma in commutative rings and introduced the class of compactly 2-packed rings. Finally, we investigate the compactly packedness, compactly 2-packedness and coprimely packedness of trivial extension (Formula presented.) of an A-module M.