In this paper we introduce a new family of icc groups Γ which satisfy the following product rigidity phenomenon, discovered in [DHI16] (see also [dSP17]): all tensor product decompositions of the II 1 factor L(Γ) arise only from the canonical direct product decompositions of the underlying group Γ. Our groups are assembled from certain HNNextensions and amalgamated free products and include many remarkable groups studied throughout mathematics such as graph product groups, poly-amalgam groups, Burger-Mozes groups, Higman group, various integral two-dimensional Cremona groups, etc. As a consequence we obtain several new examples of groups that give rise to prime factors.of the corresponding II 1 factor L(Γ) can arise only from the canonical direct product decompositions of the underlying group Γ. Pant and the second author showed the same result holds when Γ is a poly-hyperbolic group with non-amenable factors in its composition series [dSP17]. In this paper we introduce several new classes of groups for which this tensor product rigidity phenomenon still holds. Our groups arise from natural algebraic constructions involving HNN-extensions or amalgamated free products thus including many remarkable groups intensively studied throughout mathematics such as graph products or poly-amalgams groups.Basic properties in Bass-Serre theory of groups show that the only way an amalgam Γ 1 * Σ Γ 2 could decompose as a direct product is through its core Σ.An interesting question is to investigate situations when this basic group theoretic aspect could be upgraded to the von Neumann algebraic setting. It is known this fails in general since there are examples of product indecomposable icc amalgams whose corresponding factors are McDuff and hence decomposable as tensor products (see Remarks 6.3). However, under certain indecomposability assumptions on the core algebra (see also Remarks 6.3) we are able to provide a positive answer to our question.Theorem A. Let Γ = Γ 1 * Σ Γ 2 be an icc group such that [Γ 1 : Σ] ≥ 2 and [Γ 2 : Σ] ≥ 3. Assume that Σ is finite-by-icc and any corner of L(Σ) is virtually prime. Suppose that L2 , for some groups Σ 0 Γ 0 1 , Γ 0 2 , and hence Γ = Ω × (Γ 0 1 * Σ 0 Γ 0 2 ). Moreover, there is a unitary u ∈ L(Γ), t > 0, and a permutation s of {1, 2} such that M s(1) = uL(Ω) t u * and M s(2) = uL(Γ 0 1 * Σ 0 Γ 0 2 ) 1/t u * .(1.1)The same question can be considered in the realm of non-degenerate HNN-extension groups and a similar approach leads to the following counterpart of Theorem A. Theorem B. Let Γ = HNN(Λ, Σ, θ) be an icc group such that Σ = Λ = θ(Σ). Assume that Σ is finite-by-icc and any corner of L(Σ) is virtually prime. Suppose that L(Γ) = M 1⊗ M 2 , for diffuse M i 's. Then there exist decompositions Σ = Ω × Σ 0 with Σ 0 finite and Λ = Ω × Λ 0 . In addition, there is ω ∈ Ω such that θ = ad(ω) |Ω × θ |Σ 0 : Ω × Σ 0 → Ω × Λ 0 and hence Γ = Ω × HNN(Λ 0 , Σ 0 , θ |Σ 0 ). Also, there is a unitary u ∈ L(Γ), t > 0, and a permutation s of {1, 2} such that M s(1) = uL(Ω) t u * and M s(2) = uL(HNN(Λ 0 , ...