A threaded connection for pipes or tubes, the threaded connection comprising a pin and a box , the pin and the box each comprising a contact surface having a threaded portion and an unthreaded metal contact portion, at least one of the contact surfaces of the pin and the box having surface roughness having a maximum height roughness Rz in a range of 10 to 40 μm, on the contact surface having the surface roughness, the threaded connection for pipes or tubes including: a Cu-Sn-Zn alloy plating layer consisting of a Cu-Sn-Zn alloy, and a solid lubricant coating layer on the Cu-Sn-Zn alloy plating layer , the solid lubricant coating layer containing fluororesin particles; characterized in that : the at least one of the contact surfaces of the pin and the box having surface roughness having an arithmetic mean roughness Ra in a range of 1 to 8 μm; on the contact surface having the surface roughness, the threaded connection for pipes or tubes further includes a Zn-Ni alloy plating layer consisting of a Zn-Ni alloy, the Cu-Sn-Zn alloy plating layer consisting of a Cu-Sn-Zn alloy is on the Zn-Ni alloy plating layer , and the solid lubricant coating layer further contains at least one type of resin selected from the group consisting of epoxy resin and polyamide-imide resin. the pin and the box each comprising a contact surface having a threaded portion and an unthreaded metal contact portion, at least one of the contact surfaces of the pin and the box having surface roughness having a maximum height roughness Rz in a range of 10 to 40 μm, on the contact surface having the surface roughness, the threaded connection for pipes or tubes including: a Cu-Sn-Zn alloy plating layer consisting of a Cu-Sn-Zn alloy, and a solid lubricant coating layer on the Cu-Sn-Zn alloy plating layer , the solid lubricant coating layer containing fluororesin particles; a Cu-Sn-Zn alloy plating layer consisting of a Cu-Sn-Zn alloy, and a solid lubricant coating layer on the Cu-Sn-Zn alloy plating layer , the solid lubricant coating layer containing fluororesin particles; characterized in that : the at least one of the contact surfaces of the pin and the box having surface roughness having an arithmetic mean roughness Ra in a range of 1 to 8 μm; on the contact surface having the surface roughness, the threaded connection for pipes or tubes further includes a Zn-Ni alloy plating layer consisting of a Zn-Ni alloy, the Cu-Sn-Zn alloy plating layer consisting of a Cu-Sn-Zn alloy is on the Zn-Ni alloy plating layer , and the solid lubricant coating layer further contains at least one type of resin selected from the group consisting of epoxy resin and polyamide-imide resin. the at least one of the contact surfaces of the pin and the box having surface roughness having an arithmetic mean roughness Ra in a range of 1 to 8 μm; on the contact surface having the surface roughness, the threaded connection for pipes or tubes further includes a Zn-Ni alloy plating layer consisting of a Zn-Ni alloy, the Cu-Sn-Zn alloy plating layer consisting of a Cu-Sn-Zn alloy is on the Zn-Ni alloy plating layer , and the solid lubricant coating layer further contains at least one type of resin selected from the group consisting of epoxy resin and polyamide-imide resin. <EOS>