A threaded connection for pipes or tubes, the threaded connection comprising a pin (3, 13) and a box, the pin (3, 13) and the box each comprising a contact surface (130, 140) having a threaded portion (15, 20) and an unthreaded metal contact portion, at least one of the contact surfaces (130, 140) of the pin (3, 13) and the box having surface roughness having a maximum height roughness Rz in a range of 10 to 40 μm, on the contact surface (130, 140) 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 (130, 140) of the pin (3, 13) and the box having surface roughness having an arithmetic mean roughness Ra in a range of 1 to 8 μm; on the contact surface (130, 140) 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 (3, 13) and the box each comprising a contact surface (130, 140) having a threaded portion (15, 20) and an unthreaded metal contact portion, at least one of the contact surfaces (130, 140) of the pin (3, 13) and the box having surface roughness having a maximum height roughness Rz in a range of 10 to 40 μm, on the contact surface (130, 140) 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 (130, 140) of the pin (3, 13) and the box having surface roughness having an arithmetic mean roughness Ra in a range of 1 to 8 μm; on the contact surface (130, 140) 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 (130, 140) of the pin (3, 13) and the box having surface roughness having an arithmetic mean roughness Ra in a range of 1 to 8 μm; on the contact surface (130, 140) 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.