The subchannel code COBRA-TF has been introduced for an evaluation of thermal margins on the local pin-by-pin level in a pressurized water reactor. The coupling of COBRA-TF with TRAC-PF1/NEM is performed by providing from TRAC to COBRA-TF axial and radial thermal-hydraulic boundary conditions and relative pin-power profiles, obtained with the pin power reconstruction model of the nodal expansion method (NEM). An efficient algorithm for coupling of the subchannel code COBRA-TF with TRAC-PF1/NEM in the parallel virtual machine environment was developed addressing the issues of time synchronization, data exchange, spatial overlays, and coupled convergence. Local feedback modeling on the pin level was implemented into COBRA-TF, which enabled updating the local form functions and the recalculation of the pin powers in TRAC-PF1/NEM after obtaining the local feedback parameters. The coupled TRAC-PF1/NEM/COBRA-TF code system was tested on the rod ejection accident and main steam line break benchmark problems. In both problems, the local results are closer than before the introduced multilevel coupling to the corresponding critical limits. This fact indicates that the assembly average results tend to underestimate the accident consequences in terms of local safety margins. The capability of local safety evaluation, performed simultaneously (online) with coupled global three-dimensional neutron kinetics/thermal-hydraulic calculations, is introduced and tested. The obtained results demonstrate the importance of the current work.